The main cost to a company of doing this is that it may incur some higher costs and it may lose some predictability. For example, a firm that is trying to do this might try to provide day care to help its employees have a place for their children to go before and after school. This, of course, costs money. A firm might also try to provide more flexible scheduling opportunities. This makes it harder to predict when people will be available for work and it makes things like meetings harder to coordinate.
It is also possible that such programs will lead to tensions. Employees without children might resent the resources and effort being used on their colleagues while they get no such benefits. This could be a cost in terms of reduced morale.
However, you must keep in mind that there are several benefits as well. Firms with such programs may find it easier to recruit good prospects who have families. This sort of advantage might well make up for the added costs.
It is entirely possible that there is no cost at all, and that, in fact, there is a benefit to the company that provides its employees with a work-life balance. Employees who have the wherewithal to attend to their personal lives are far more productive employees than those who do not have that option. People's lives are messy. They have spouses and partners. They have children. They have ailing parents. When they are worried about things in their personal lives, they are not giving their all on the job. When they are able to address their concerns, they are more productive and have some feeling of allegiance to the company. There is less employee turnover when this is addressed, which is also a benefit to a company. I don't know what studies have been done in this area, but I would hazard a guess that the companies voted "Best Company to Work For" are usually those that try to help their employees achieve that balance.