It is a common practice in our society to recite Surah Maryam during pregnancy when expecting a baby daughter even though there is no explicit hadith from our Prophet Muhammad peace be upon him recommending such action.
The practice could have taken root based on the fact that the surah tells the story of Lady Maryam and it is hoped that the unborn child will inherit the honorable traits of Lady Maryam.
However, upon closer inspection, this surah of 98 verses; contains story of other prophets too namely:
1) Prophet Zakariyya and his son; Prophet Yahya (verse 2-15),
2) Lady Maryam and her son; Prophet Isa (verse 16 - 34),
3) Prophet Ibrahim and his sons; Prophet Ishak and Yaa'qub (verse 41-50)
4) Prophet Musa, Harun and prophet Ismail Alaihim Salam (very briefly)
Therefor, the story of Lady Maryam and Prophet Isa appears in less than one sixth of the surah.
This doesn't mean that the surah is not beneficial to the pregnant mommy. On the contrary there are a lot of beautiful verses in the surah that when you read it, you hope and you pray that your unborn baby will develop similar traits.
Below are some commendable characteristics mentioned in Surah Maryam :
1) The character of Prophet Yahya alaihissalam (verse 12 - 15)
"...And We gave him wisdom, while he was yet a child."
"And (made him) sympathetic to men as a mercy from Us, and pure from sins, and he was righteous."
"And dutiful towards his parents, and he was neither arrogant nor disobedient (to Allah or to his parents)."
"And peace be on him, the day he was born, the day he dies, and the day he will be raised back to life."
2) The chastity of Lady Maryam (verse 20)
"...How can I have a son when no man has touched me nor am I unchaste?"
3) The qualities of Prophet Isa alaihis salam (verse 31- 33)
"and He has made me blessed wheresoever I be.."
"and dutiful to my mother, and made me not arrogant, unblest."
"and peace be upon me the day I was born, and the day I die, and the day I shall be raised alive."
4) The feature of Prophet Ibrahim and his sons; Prophet Yaaqub and Prophet Ishak alaihim salam (verse 48 - 50)
"and I (Prophet Ibrahim) shall turn away from you (his father) and from those whom you invoke beside Allah.."
i.e. the attribute of tawheed and turning away from shirk
"and We gave them (Ibrahim and his two sons) Our Mercy (bountiful provision) and We grant them honour on the tongue (of all the nations; that is everyone remember them with good praise)"
i.e. the bountiful ni'mah granted by Allah and good standing among society.
5) The traits of Prophet Ismail alaihis salam (verse 54 - 55)
"..Verily! He was true to what he promised.."
"and he used to enjoined on his family and his people the Salah and Zakah, and his Lord was pleased with him."
6) The mark of Prophet Idris alaihis salam (verse 56 - 57)
"..He was a man of truth.."
"and We raised him to a high station."
7) The virtues of the guided and chosen ones (verse 58)
".. when the verses of the Most Beneficient (Allah) were recited unto them, they fell down prostating and weeping."
8) last but not least to be among those who repent and believe in Allah and His messenger and do righteous deeds so that they may enter the Eden (Paradise) (verse 60 - 61)
"Except those who repent and believe (in the Oneness of Allah and His Messenger Muhammad) and perform righteous deeds. Such will enter Paradise and they will not be wronged at all."
"They will enter "Adn (Eden) Paradise, which the Most Beneficient (Allah) has promised to His servants in the unseen, Indeed! His Promise must come to pass."
These are all commendable attributes that all of us would love to adopt and would even more so love our children to practice. It is then in my opinion, very beneficial for us to recite this surah regardless we are carrying a son or daughter in our womb and we hope by reciting these wonderful verses our unborn child will be used to hearing these wonderful traits of the Prophets and will apply it in his life later on.