Baptism by immersion is in the similitude of birth, death, and resurrection.
Baptism, the third principle and first ordinance of the Gospel, is essential to salvation and exaltation in the kingdom of God. Baptism is, first, the means by which the repentant individual obtains remission of sins. Second, it is the gateway into the kingdom of God. The Lord, talking with Nicodemus, tells us so in John 3:1–11. …
… Baptism is by immersion in water. … Baptism cannot be by any other means than immersion of the entire body in water, for the following reasons:
(1) It is in the similitude of the death, burial and resurrection of Jesus Christ, and of all others who received the resurrection.
(2) Baptism is also a birth and in the similitude of the birth of a child into this world.
(3) Baptism is literally, as well as a figure of the resurrection, a transplanting, or resurrection from one life to another—the life of sin to the life of spiritual life.
Little children who have not reached the years of accountability do not need baptism because they are redeemed through the Atonement of Jesus Christ.
I know that little children who have not reached years of accountability, and hence are not guilty of sin, are … redeemed through the blood of Christ, and it is solemn mockery to contend that they need baptism, denying the justice and mercy of God [see Moroni 8:20–23].
In the 29th Section of the Doctrine and Covenants the Lord says this (verses 46–47):
“But, behold, I say unto you, that little children are redeemed from the foundation of the world through mine Only Begotten;
“Wherefore, they cannot sin, for power is not given unto Satan to tempt little children, until they begin to become accountable before me.
Every person baptized into the Church has made a covenant with the Lord.
Each person, as he enters the waters of baptism, takes upon himself a covenant.
“And again, by way of commandment to the church concerning the manner of baptism—All those who humble themselves before God, and desire to be baptized, and come forth with broken hearts and contrite spirits, and witness before the church that they have truly repented of all their sins, and are willing to take upon them the name of Jesus Christ, having a determination to serve him to the end, and truly manifest by their works that they have received of the Spirit of Christ unto the remission of their sins, shall be received by baptism into his church.” (D&C 20:37.)
To gain the full blessings of the gospel, we must continue to be humble, repentant, and obedient after we are baptized.
Who, among Latter-day Saints, is seeking a place in the telestial kingdom? Who, among the Latter-day Saints, is seeking a place in the terrestrial kingdom? With those kingdoms we should want nothing to do; it is not the intention of the man who is baptized into the Church, or ought not to be, to so live that he will not find a place in the celestial kingdom of God; for baptism, itself, is the way into that kingdom. Baptism is of two-fold nature; primarily for the remission of sins, and then, entrance into the kingdom of God, not the telestial kingdom, not into the terrestrial kingdom, but entrance into the celestial kingdom, where God dwells. That is what baptism is for; that is what the gift of the Holy Ghost, by the laying on of hands, is for—to prepare us that we may, through obedience, continue on and on, keeping the commandments of the Lord, until we shall receive the fullness in the celestial kingdom.
(lesson from Teachings of Presidents of the Church: Joseph Fielding Smith, (2013), 171–80)