The history of baptism is quite interesting, and much more complex than most people know.
Baptism seems to be related to the ancient Jewish rite called “mikvah”, which was/is used for conversion to Judaism, ritual cleansing (Law of Moses type things, childbirth, women’s menstruation, and other things.) If you go to this link at Wikipedia, you can see a contemporary Mikvah font which look quite similar to a modern-day Christian baptismal font (at the bottom of the article.)
It seems that during Christ’s ministry, baptism became an important part of conversion. Yes he certainly was baptized at 30. Prior to that, there is no evidence that he embarked on starting a religion. I think one could make a case that if he had started his ministry at a younger age, he probably would have been baptized at a younger age. His baptism is one of the first events (if not the first) of the organization of his church.
One of the first questions among earlier followers of Jesus was the question of when to baptize. Now the Emporer Constantine (Appx 350 AD) often gets a bad rap for waiting until his deathbed to get baptized. However, it was a very common practice for early clergy to support this position. So Constantine was actually following the spiritual advice of the clergy of his day.
Now, while Constantine’s baptism was by no means unusual for the day, the whole topic of when to baptize was by no means uniform. It is unclear when infant baptism was first performed, but it could date to this early church period also.
There were 2 main thoughts on baptism during this period. One line of reasoning said that it should be put off as long as possible, in order to wash away all sins. Because if one didn’t wait until deathbed, and one later sinned, there could be no forgiveness of sins.
So using this logic, Constantine’s baptism makes perfect sense. However, it is not always easy to predict when death will occur, so some people erroneously waited too long, which was also a problem.
Since infant mortality was also a big problem, it made sense to baptize infants. The doctrine of original sin was being developed in this early time period also. Of course, people who subscribed to infant baptism felt that sins could be forgiven as long as they weren’t “major” sins, such as sacrificing to pagan gods, adultery, fornication, or a few other sins.
Then there were some who said a major sin could be forgiven just once. The dispute on this doctrine became quite contentious.
So, as you can see, when to baptize is not an easy question to answer, and really isn’t addressed well in early christian history.
The Book of Mormon position is quite unique, and says children are incapable of committing sin. Therefore they do not need to be baptized. Moroni 8:11-12 states,
11 And their little children need no repentance, neither baptism. Behold, baptism is unto repentance to the fulfilling the commandments unto the remission of sins.
12 But little children are alive in Christ, even from the foundation of the world; if not so, God is a partial God, and also a changeable God, and a respecter to persons; for how many little children have died without baptism!