The Shulhan Aruch (Orah Haim 123:1) says that one and one’s wife should recite the blessing of “Hatov Vehametiv” after the latter gives birth to a boy. Generally speaking, this blessing is recited in situations in which there is an exceptional level of joy. This blessing has the status of Reshut, which means that it is not obligatory but rather optional.
Although the birth of a girl can be as joyous or more so than that of a boy, onedoes not recite this blessing when one has a daughter. The Mishna Berura(O.H. 123:2) explains that even if one had multiple boys and had the merit of having a girl, thus fulfilling the Mitzvah of Peru Urvu, one would not recite HatovVehametiv. Nevertheless, he writes that just as one recites “Sheheheyanu” when seeing one’s friend after at least thirty days, and certainly having a baby daughter is not less joyous than this, one could recite Sheheheyanu on the birthof a girl. It does appear, however, that nowadays people are not particular about reciting either of these blessings when they have a new boy or girl. Furthermore, the Sephardic custom is to recite Sheheheyanu at the Brit Milaand the Poskim explain that this blessing takes the place of Hatov Vehametivfor a boy. Regarding a girl, if one is very joyous one may recite Sheheheyanu. Since this is not customary nowadays, and if one is in doubt as to whether onemay recite it, one can wear a new article of clothing and recite Sheheheyanu on that and have the birth of the girl in mind.
The birth of a sibling or a grandchild does not warrant either blessing since it is not Halachically considered a joy that directly impacts a person. Nonetheless, the HIDA (Commentary to Sefer Hasidim, § 843) writes that one may recite a blessing without Hashem’s Name.
Summary: Hatov Vehametiv is not typically recited over the birth of a boy. The custom nowadays is to recite Sheheheyanu at the Brit Mila of a boy. One may recite Sheheheyanu if one is very joyous about the birth of one‘s girl.