Why does the Tora say a woman is impure 40 days after having a boy and 80 days after having a girl (Yesterday's perashah)
Let us first clarify the facts, and then offer possible explanations. After the birth of a boy, the woman is impure for 7 seven days (even if there was no blood), and pure for the following 33 (even if she were to see blood). After the birth of a girl, the woman is impure for 14 days, and pure for the following 66. Thus, both the impure and pure days for a girl are doubled.
Nowadays, we do not practice the "pure" days. The woman remains impure and has the status of a "nidah" until the bleeding stops and she can count the seven clean days, for both a boy and a girl. Afterwards, she may immerse in the mikvah.
Therefor, there is no practical difference nowadays between the pirth of a boy and that of a girl.
Why are the days doubled? Some early commentators (see Ibn Ezra and Ramban Vayikra 12:4-5) suggest that there is a biological difference between the creation of a female and that of a male, or in the quantity of secretions that follow the birth. This explanation is difficult to accept nowadays, although there may be deeper, kabbalistic, differences in the formation of their respective spiritual nature. Another explanation, offered by Rav Shmuel Eliyahu shlita, is that Adam underwent a single creation, whereas Eve underwent a double creation – first as part of Adam, and afterwards as a distinct person. Thus, the birth of a girl represents a double birth, and hence the days of impurity and purity are doubled.