If a child under the age of accountability sins, such as if he/she uses bad language, is it still a sin? The child doesn't understand that it's wrong, not yet.
If a child lives in a second floor apartment and climbs the balcony railing will the parent scold them or punish them, even if the child has never before been told not to climb the balcony railing? It is wrong and dangerous, even if the child does not understand why.
In the same way, sin is sin, even if the child does not understand. That is why a child needs to be baptized when he reaches “the age of accountability” (understands that he has sinned and needs God’s forgiveness).
Some would say, “then how can you say that a child should not be baptized as an infant?” Why wait until faith and repentance are possible? Because those are God’s requirements prior to salvation. Does that mean that a child who sins without knowing it is lost forever? I think the Bible indicates otherwise.
The Law of Moses, for instance, provided for sin offerings (Leviticus 4). These were sacrifices to be brought when a person learned that he had sinned “through ignorance.” When the sin should “come to his knowledge” he was liable for making a sin offering. This would indicate that until he was aware of his sin (like a child is unaware that what they are doing is wrong) it was still a sin but he was not held accountable for it. Since the Law gives us insight into the mind of God, we could extend this concept to children and others who are incapable of understanding either the sin or the sacrifice. Once a person is aware of sin, though, they become guilty and therefore require a savior.