Short Answer
It is good to congratulate parents when they have a new child by praying for them. This may be done by asking Allah to bless the child, let it grow up to be righteous, be a comfort to parents, have good health, and that the parents are thankful for the blessing.
What the Qur’an and Sunnah Say
Abu Musa said, “A son was born to me, so I took him to the Messenger of Allah. He named him Ibrahim…asked Allah to bless him, and then gave him back to me…” (Bukhari #5166)
What the Scholars Said
Imam Hasan Al-Basri once encouraged someone to say the following words when congratulating new parents:
بَارَكَ اللَّهُ لَكَ فِي الـمَوْهُوبِ لَكَ، وَشَكَرْتَ الوَاهِبَ، وبَلَغَ أشُدَّهُ، وَرُزِقْتَ بِرَّهُ
“May Allah bless you in this gift to you, may you give thanks to the giver of this gift, may the child reach maturity, and may you be granted its righteousness.” (An-Nawawi, Al-Adhkar, 349; Ibn Al-Qayyim, Tuhfat Ul-Mawlud, 35) (The narration is weak but is good general advice)
Imam Ayyub As-Sakhtiyani used to congratulate new parents with the following supplication:
جعله الله مباركاً عليك وعلى أمة محمد صلى الله عليه وسلم
“May Allah make the child a blessing for you and a blessing for the Community of Muhammad.” (Tabarani #945)
Version 0.25
Shaykh Mustafa Umar