This question has come up much this week regarding children and heaven. While some may not agree with what I state here, know that I have a peace about this.
Rather than re-writing an answer, I thought I'd share the answer from the website www.gotquestions.org.
Question: "Where do I find the age of accountability in the Bible? What happens to babies and young children when they die?"
Answer: Frequently lost in the discussion regarding the age of accountability is the fact that children, no matter how young, are not “innocent” in the sense of being sinless. The Bible tells us that even if an infant or child has not committed personal sin, all people, including infants and children, are guilty before God because of inherited and imputed sin. Inherited sin is that which is passed on from our parents. In Psalm 51:5, David wrote, “Surely I was sinful at birth, sinful from the time my mother conceived me.” David recognized that even at conception, he was a sinner. The very sad fact that infants sometimes die demonstrates that even infants are impacted by Adam’s sin, since physical and spiritual death were the results of Adam's original sin.
Each person, infant or adult, stands guilty before God; each person has offended the holiness of God. The only way God can be just and at the same time declare a person righteous is for that person to have received forgiveness by faith in Christ. Christ is the only way. John 14:6 records what Jesus said: “I am the way, and the truth, and the life; no one comes to the Father, except through Me.” Also, Peter states in Acts 4:12, “Salvation is found in no one else, for there is no other name under heaven given to men by which we must be saved.” Salvation is an individual choice.
What about babies and young children who never reach the ability to make this individual choice? The age of accountability is a concept that teaches those who die before reaching the age of accountability are automatically saved, by God’s grace and mercy. The age of accountability is a belief that God saves all those who die before reaching the ability to make a decision for or against Christ. Thirteen is the most common number given for the age of accountability, based on the Jewish custom that a child becomes an adult at the age of 13. However, the Bible gives no direct support to the age of 13 always being the age of accountability. It likely varies from child to child. A child has passed the age of accountability once he or she is capable of making a faith decision for or against Christ.
With the above in mind, also consider this: Christ's death is presented as sufficient for all of mankind. First John 2:2 says Jesus is “the atoning sacrifice for our sins, and not only for ours but also for the sins of the whole world.” This verse is clear that Jesus' death was sufficient for all sins, not just the sins of those who specifically have come to Him in faith. The fact that Christ's death was sufficient for all sin would allow the possibility of God’s applying that payment to those who were never capable of believing.
The one passage that seems to identify with this topic more than any other is 2 Samuel 12:21-23. The context of these verses is that King David committed adultery with Bathsheba, with a resulting pregnancy. The prophet Nathan was sent by the Lord to inform David that because of his sin, the Lord would take the child in death. David responded to this by grieving, mourning, and praying for the child. But once the child was taken, David's mourning ended. David's servants were surprised to hear this. They said to King David, “What is this thing that you have done? While the child was alive, you fasted and wept; but when the child died, you arose and ate food.” David's response was, “While the child was still alive, I fasted and wept; for I said, ‘Who knows, the LORD may be gracious to me, that the child may live.’ But now he has died; why should I fast? Can I bring him back again? I shall go to him, but he will not return to me.” David's response indicates that those who cannot believe are safe in the Lord. David said that he could go to the child, but that he could not bring the child back to him. Also, and just as important, David seemed to be comforted over this. In other words, David seemed to be saying that he would see the child (in heaven), though he could not bring him back.
Although it is possible that God applies Christ's payment for sin to those who cannot believe, the Bible does not specifically say that He does this. Therefore, this is a subject about which we should not be adamant or dogmatic. God’s applying Christ’s death to those who cannot believe would seem consistent with His love and mercy. It is our position that God applies Christ's payment for sin to young children and those who are mentally handicapped, since they were not mentally capable of understanding their sinful state and their need for the Savior, but again we cannot be dogmatic. Of this we are certain: God is loving, holy, merciful, just, and gracious. Whatever He does is always right and good.
This may be a controversial subject and some may never have an answer that fully satisfies. I believe that Jesus is the way to salvation. I also believe this is the case for any who have died. If they could come back and say anything to us from eternity, they would say "Get your life right with Jesus today."