Islam is a Deen that teaches us to love for others that which we love for ourselves. Hence, when our friends or relatives are blessed with a child, we should be happy for them and try to increase their joy. We should congratulate them on the blessing that they have received from Allah Ta‘ala and make du‘aa for them, as du‘aa is one of the greatest gifts that a person can give the next.

Furthermore, doing so will not only strengthen our ties and create love among us, but will also bring us barakah (blessings) as when a person makes du‘aa for the next person, Allah Ta‘ala accepts that same du‘aa for the one who made it. Thus, a very effective method of making our children obedient and pious is to make du‘aa that Allah Ta‘ala grant others pious and obedient children.

A man who had just been blessed with a child was once in the presence of Hasan Basri (rahimahullah) when another person arrived. The newcomer, on seeing the father of the new-born, said, “Congratulations on your horseman! (referring to the new-born child) Hearing this, Hasan Basri (rahimahullah) asked, “How do you know whether this child will be a horseman or a donkey?” This person thus asked, “How should we then congratulate the parent?” Hasan Basri (rahimahullah) replied, “Make the following du‘aa: May Allah Ta‘ala bless you in the child that He has gifted you, may He bless you with the ability to show Him gratitude for this child, may this child reach the peak of his strength and may he be obedient to you.”

(Tuhfatul Moudood pg. 27)