In short, the laws of tumah after childbirth are the following:
For a boy, the mother has seven days of impurity. Mikveh.
33 days of purity even if blood is seen. Korban.
For a girl, 14 days of impurity. Mikveh. 66 days of purity even if blood is seen. Korban. No one can claim to know the secrets of the Torah, but we can try to give some possible sense of meaning for its laws without any claim to be authoritative. First we notice that the law for a girl is double the days of the law for a boy. We can assume that the paradigm law is the shorter of the two periods. (At some point we can attempt to explain the doubling that occurs for the female child.) So let's begin by trying to understand the laws for the male child.
We know that the number seven symbolizes the totality of the physical world. G-d created the world in seven days. Seven is the 6 directions plus the center point.
Rav Hirsch explains that kedusha is a state resulting from one's experiencing one's freewill and using it correctly. Tumah comes from a loss of this freewill experience. Childbirth is an experience where on the one hand a woman can feel very close to G-d, being His partner in creation, but the physical experience can leave a woman feeling helpless. Her body is overcome with involuntary contractions. She goes through a earthy process where she is reminded of the commonality of man to the ordinary mamal. So Rav Hirsch explains the tumah as the result of this return to a natural state, this inundation by the physical world, and the seeming loss of human freewill.
Additionally, during the first seven days she feels a void, because of the loss of the extra life that had been within her. The 33 days represent the process of returning back to the normal state, to the state of kedusha. We are now between Pesach and Shavuos. We see the number seven in the sefirah period. Thus we count not just the days, but the 7 weeks. We also have a day in the middle, the number 33. And we don't really know what this day is. We know, as the Ramban in parshat Emor says this period was a happy, festive occasion. The period of sefirah was like one long chol hamoed until Shavuos.
Only relatively later did this period became a sad time. The Talmud tells us that it became a sad time because the students of Rabbi Akiva died between Pesach and Shavuos. We don't really know for how long they died. One tradition is that they died up to the 33rd of the omer (Lag BaOmer) and not after. The other tradition is that they died for 33 different days during sefirah, but that on Lag BaOmer they didn't die. They again began to die after the 33rd day. So, though there are different traditions, one thing is for certain, on the 33rd day they did not die. So this day is a festive time.
But still what is the underlying spiritual reason that this day is a positive time so much so that it stopped the dying of Rabbi Akiva's students? The Baaleh Kabbalah tell us another piece of information why this day is special, but it is not clear how it fits into what we have said so far. They tell us that it is the yortzeit of Rabbi Shimon bar Yochai. We light fires to represent the Torah of Rabbi Shimon as the story in mesechta Brochos relates. But when do we find that a zaddik dying can be a festive occasion? This certainly was not always true. The day of Moshe Rabenu's death is a sad day, some people fast on this day. The Baaleh Kabbalah say the Rabbi Shimon's yortzeit is different. Rabbi Shimon was the main student of Rabbi Akiva and he survived the plague that killed them. What killed them? The talmud calls the plague askara, a sickness of the throat. But another Gemara says the spiritual cause of their death was because "Shelo nahagu kavod zebezeh", they did not speak to one another with respect. I.e. also a problem with their throats. Some commentaries say really they died at the hands of the Romans. The students are known to have joined with Bar Kokba and failed, but Rabbi Shimon hid in a cave and survived. The survival of Rabbi Shimon reminds us that the Jews and the Torah survived. There had been greater sadness at the death of students of Rabbi Akiva than at the destruction of the Temple because it had seemed to be the end of Torah. But Rabbi Shimon gave hope that Torah would survive.
In the Zohar, in a dream, Rabbi Shimon asks the Moshiach when is he coming "amasai kaasi mar?" He answers, "kshyafutzu mayonosecha hutza." "When your Torah is spread." So while the death of Rabbi Akiva's students represents the destruction of the Jewish people and their Torah, Rabbi Shimon and his Torah represent the redemption of the Jewish people.
We see that the 7 weeks of sefirah represent death overcoming the sages of Torah. If nature implies the entropy of matter and death, then the 7 weeks of sefirah represent nature winning. Death overcoming the sages of Torah. Rabbi Shimon represents that that is not the end of everything. There is a way back. Nature is represented by the number 7. The way back is represented by the number 33. Lag BeOmer represents this return. It is the counter balance of the sadness of sefirah. We say don't worry. The Lag BeOmer makes up for the destruction and the tuma. There is a seven of destruction and 33 of a rebuilding. And together you have 40 representing rebirth and renewal.
This is the meaning of the variuos periods a woman must go through on her way from that extreme experience of giving birth back to normal. First she has the seven of complete tumah and then the 33 which is the counter balance of purity. Then she is normal, and can enter the Temple once again. Then she brings a korban olah and a sin offering.
The Talmud asks: What sin did she commit that she needs to bring a sin offering? Says the Talmud, her sin was that she may have thought during her labor pains that she will never have relations with her husband again because of what terrible pains it has brought her. So for that vow she has to now bring the sin offering. But a vow which is only thought but not expressed is nothing, so there is no need for the offering. Moreover, who says she really even had this thought? So in fact we must say that this offering is not for her personal sin but for a general, universal sin. What sin is this?
Labor pains we know only came into being because of the sin of Adam and Eve. And we know G-d punishments always fit the crime. How is labor pain "mida keneged mida" for the sin of Chava? The sin of Chava created strife between people. Man was originally one being. And only later was he seperated into two beings so that they can experience unity. Thus since they were really united even after the creation of Chava, we can understand why Adam did not hesitate when offered the fruit to eat. He still had the view that Chava was a part of him and if for example your hand gives your mouth food, your mouth does not refuse. But Chava had already sinned and developed the trait of selfishness. Thus, Chazal explain that she fed Adam the fruit so she would not be alone in her sin. That he should suffer the consequences too. This is selfishness, jealousy, and the opposite if unity. Thus, her sin created strife between people. The pain of labor when a child seperates from its mother represents the general pain that is caused by all seperations of people one from another. So the labor pains fit the crime of causing disunity and strife between people.
In general all mitzvoth are pleasant. "Derachecha darche noam." For example, eating kosher may in certain circumstances make you suffer, but it is not essentially a unpleasant or difficult mitzvah. But there are two exceptions to this rule. Brit milah (thus no shechianu is said in hutz laAretz) and childbirth. Both are painful mitzvot. But both mitzvoth are performed by one who doesn't experinece the pain himself. Why these two? Because both involve the creation of new people, the bringing forth of children. The Messianic age will be void of this pain. The prophet Malachi say Moshiach will return "the hearts of sons to their fathers". In other words, the gap between people will be closed. When the Talmud explains why a woman brings a sin offering after birth, it is explaining that she is bringing the offering to atone for the universal sin of Adam and Chava, not for anything she has personally done.
This offering represents the general role of the Jews in the world. Before the sin of Adam and Chava man controlled nature. But the curse after the sin is that we are vulnerable to nature. That vulnerability is represented by the number seven. 33 is our effort to overcome that curse. The death of Rabbi Akiva's students is our vulnerability to nature either as represented though the hand of the Roman army or the plague. This is represented by the seven weeks. 33 is our efforts spiritually through the Torah of Rabbi Shimon to overcome our vulnerability. The struggle between the physical and the spiritual is the struggle between the number 7 and the number 33. Only at the end of this period will nature again be subdued to spirituality. This will lead again to normalcy. Only then can the woman return and come into the Temple.
The Temple represents redemption and perfection. Even in the super pure state of the 33 days she could not enter the Temple because that is a time of struggling against nature to reach normalcy. Only after the struggle is over is she back to normal and can enter the Temple, the place of redeption. The perfect state is shalom. Labor only became something bad because of the sin of Adam and Chava. Therefore, she went into a peroid of 7 days of tuma where she is so to speak "under the power of nature." The 33 days is supper pure not because it is ideal, afterall we see that she can't enter the temple. Rather it fits to the rule of the Rambam that to overcome something you must go to the opposite extreme. She must become insensitive to tuma, to blood to counter the tuma of the earlier seven so that she may eventually become normal.
We can conclude that Rabbis Shimon's death is happy because he left for us his Torah which will bring the final redemption. So it is no coincidence that Rabbi Shimon's death is on the 33rd day. It represents that in the midst of tragedy there is a seed of geula. Let us recall also that to accept Torah one must be modest and humble. A student can only learn who is ready to hear things. Gaavah is the opposite. The students of Rabbi Akiva died in this very period. Although they were Zadikim, but who on their level did not honor one another and had too much gaava to accept each other's Torah. In general, getting ready to accept Torah on Shavuos is a happy time. We count up to it. But we need to keep in mind the modesty needed to receieve Torah and knowledge from our fellow Jews.