To beget a child in a godly atmosphere is known in the Vedic scriptures as Garbhadhana-samskara. If the parents want a child in the godly qualities they should follow the ten principles recommended for the social life of the human being. In Bhagavad-gita we have studied also before that sex life for begetting a good child is Krsna Himself. Sex life is not condemned, provided the process is used in Krsna consciousness. Those who are in Krsna consciousness at least should not beget children like cats and dogs but should beget them so that they may become Krsna conscious after birth. That should be the advantage of children born of a father and mother absorbed in Krsna consciousness.
Srila Prabhupada — Bg 16.1-3, purport