In talking about people who commit sin, the scriptures are usually referring to people who have used their agency to choose sin. There are two other groups of people, however, who commit sin. These people are (1) those who are too young to be accountable for their actions and (2) those who live without the law of God and thus sin in ignorance.
Not Accountable Before God
King Benjamin taught that those who “sin” without understanding the law of God will not be held responsible for their “sins”, and they are cleansed by the blood of Christ.
For behold, and also his blood atoneth for the sins of those who have fallen by the transgression of Adam, who have died not knowing the will of God concerning them, or who have ignorantly sinned. (Mosiah 3:11)
Children Are Clean
When the Savior visited the Nephites after his resurrection, he reinforced the teaching of King Benjamin that children are cleansed by the Atonement and do not need repentance. When Jesus said children were of the kingdom of God, he implied that children are without sin, indicating his atonement has already cleansed them.
Wherefore, whoso repenteth and cometh unto me as a little child, him will I receive, for of such is the kingdom of God. Behold, for such I have laid down my life, and have taken it up again; therefore repent, and come unto me ye ends of the earth, and be saved. (3 Nephi 9:22)
Towards the end of the Book of Mormon era, Moroni received an epistle from his father, Mormon. In that epistle, his father expressed his understanding of the effect of the Atonement on children. He began by expressing his concern that the Nephites were baptizing children.
And now, my son, I speak unto you concerning that which grieveth me exceedingly; for it grieveth me that there should be disputations rise among you.
For, if I have learned the truth, there have been disputations among you concerning the baptism of your little children.
And now, my son, I desire that ye should labor diligently, that this gross error should be removed from among you; for, for this intent I have written this epistle. (Moroni 8:4-6)
Mormon explained why baptism of children was a serious error.
For immediately after I had learned these things of you I inquired of the Lord concerning the matter. And the word of the Lord came to me by the power of the Holy Ghost, saying:
Listen to the words of Christ, your Redeemer, your Lord and your God. Behold, I came into the world not to call the righteous but sinners to repentance; the whole need no physician, but they that are sick; wherefore, little children are whole, for they are not capable of committing sin; wherefore the curse of Adam is taken from them in me, that it hath no power over them; and the law of circumcision is done away in me.
And after this manner did the Holy Ghost manifest the word of God unto me; wherefore, my beloved son, I know that it is solemn mockery before God, that ye should baptize little children. (Moroni 8:7-9)
He then explained who should be baptized.
Behold I say unto you that this thing shall ye teach–repentance and baptism unto those who are accountable and capable of committing sin; yea, teach parents that they must repent and be baptized, and humble themselves as their little children, and they shall all be saved with their little children.
And their little children need no repentance, neither baptism. Behold baptism is unto repentance to the fulfilling the commandments unto the remission of sins. (Moroni 8:10-11)
Mormon explained that children needed no baptism because God is fair and just.
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!
Wherefore, if little children could not be saved without baptism, these must have gone to an endless hell.
Behold I say unto you, that he that supposeth that little children need baptism is in the gall of bitterness and in the bonds of iniquity; for he hath neither faith, hope, nor charity; wherefore, should he be cut off while in the thought, he must go down to hell.
For awful is the wickedness to suppose that God saveth one child because of baptism, and the other must perish because he hath no baptism. (Moroni 8:12-15)
That is, Mormon said that because children are too young to be accountable for their actions, God treats all children equally and is thus just and fair. He went on to explain that children are clean because of the Atonement of Jesus Christ.
Little children cannot repent; wherefore, it is awful wickedness to deny the pure mercies of God unto them, for they are all alive in him because of his mercy.
And he that saith that little children need baptism denieth the mercies of Christ, and setteth at naught the atonement of him and the power of his redemption.
Wo unto such, for they are in danger of death, hell, and an endless torment. I speak it boldly; God hath commanded me. Listen unto them and give heed, or they stand against you at the judgment-seat of Christ.
For behold that all little children are alive in Christ, and also all they that are without the law. For the power of redemption cometh on all them that have no law; wherefore, he that is not condemned, or he that is under no condemnation, cannot repent; and unto such baptism availeth nothing —
But it is mockery before God denying the mercies of Christ, and the power of his Holy Spirit, and putting trust in dead works.
Behold, my son, this thing ought not to be; for repentance is unto them that are under condemnation and under the curse of a broken law.
And the first fruits of repentance is baptism; and baptism cometh by faith unto the fulfilling the commandments; and the fulfilling the commandments bringeth remission of sins;
And the remission of sins bringeth meekness, and lowliness of heart; and because of meekness and lowliness of heart cometh the visitation of the Holy Ghost, which Comforter filleth with hope and perfect love, which love endureth by diligence unto prayer, until the end shall come, when all the saints shall dwell with God. (Moroni 8:19-26)