Friends of mine are expecting a child, and they asked: what blessing does one say at the happy event? I did a little bit of research for them, and the answer's not entirely uncomplicated. (Of course, a pedant -- this blogger, for instance -- is someone who refuses to give a simple answer.) Any erudition in this summary is not mine, but gleaned from a very useful article in Hebrew.
In tractate Brachot ("Blessings," of course) 59b, there is a distinction made between the blessing [Praised are you, God, Ruler of the universe] Who is good and does good (i.e. Hatov ve-hameytiv) and the Shehekheyanu. According to the anonymous source, the first is said when one hears good news that affects a number of people, while the second is said when the good news affects only the hearer. Examples given of the second case are the building of a new house (presumably a single-dweller unit!). An example given of the first case is the birth of a son. No blessing on the birth of a daughter is mentioned.
The unclarity of this Talmudic passage gives rise to many of the questions of future commentators. Is the birth of a son an illustrative or rather a defining and limiting example? Why is the birth of a daughter not mentioned? What if the parents prefer a daughter to a son, or welcome both equally?
Many traditional commentators adduce other references in the Gemara which suggest that a son is a preferable to a daughter. The halachic conclusions deriving from this are various. The Shulchan Aruch rules that one should say Hatov ve-hameytiv, but does not mention any blessing for a daughter. The Mishnah Berurah (a late 19th- and early 20th-century commentary on the Shulchan Aruch) reasons that the birth of a daughter should be at least as welcome as seeing a friend one has not laid eyes on for thirty days, which requires Shehekheyanu -- and thus requires this blessing in such a case.
Some communities have had the custom to recite no blessing, either because (a) it is generally unclear whether a son is preferable to a daughter by both father and mother; or (b) the true "glad tidings" are the news of the pregnancy, over which a blessing can't be said for technical reasons of timing.
I think these various routes have been mistaken, or, to be more generous, motivated by historical concerns favoring boys over girls. I would venture to suggest that the birth of either a boy or a girl is a piece of happy news bringing joy and benefit to all friends and family that hear it, thereby meriting the blessing Hatov ve-hameytiv. Of course, you are free to make your own decisions.