Some will say there is no such thing as an age of accountability, and that there is no guarantee that a child who dies in childhood or infancy will go to heaven. Some, especially hard-core Calvinists will say either that only 'elect' children will go to heaven, or that God allows only, 'elect' infants to die. That, in my opinion, is a stretch, to fit their Calvinist definition of election.
Others rely on their hope that the 'Judge of all the earth will do right' (Gen 18:25), but that is merely a hope in the matter of a child's death, and certainly no firm guarantee.
Others will place their hope that God will be 'fair,' and not send anyone to hell who has not been able to make a decision to follow Christ.
John Piper suggests,
God only executes this judgment on those who have the natural capacity to see his glory and understand his will, and refuse to embrace it as their treasure. Infants, I believe, do not yet have that capacity; and therefore, in God's inscrutable way, he brings them under the forgiving blood of his Son.
...but does not suggest we can know what that age might be. Most people who believe in an age of accountability will say that the age varies from child to child, or will give an age of twelve, or thirteen, but what Scriptural evidence they have for this view, I do not know.
But I believe that we may know exactly what that age is, and it is Biblical. Here is how I arrived at my conclusion. Consider the following passages:
'Because they have not followed me wholeheartedly, not one of the men twenty years old or more who came up out of Egypt will see the land I promised on oath to Abraham, Isaac and Jacob- (Num 32:11)
In this desert your bodies will fall—every one of you twenty years old or more who was counted in the census and who has grumbled against me. (Num 14:29)
And the little ones that you said would be taken captive, your children who do not yet know good from bad—they will enter the land. I will give it to them and they will take possession of it. (Deut 1:39)
By harmonizing these three verses, I believe we can infer that:
1. There is an age (at least there was among the Israelites in the desert) before which a person did not know good from bad.
2. This age was the age below which children were allowed to enter the promised land.
3. That age was 20 years of age.
I believe we can reasonably accept this as an age of accountability, established by God Himself.
The main objection I hear when I express this opinion is that 20 seems too old; that much evil is done by people before the age of 20 and that they should be accountable for their sins. But that, in my opinion, is really an emotional objection. It may be a matter of the foolishness of God being wiser than man's wisdom ( (1 Corinthians 1:25) When we see criminal acts being committed our sense of justice cries out that the perpetrators (even, and sometimes perhaps especially, teenagers) be punished. And of course they should. Probably even more severely under the law that they now are.
But accountability to secular law and accountability to God are two entirely separate things. It is important to remember, of course, that this is not because children are 'innocent' of sin. The sin of Adam has tainted us all, including the very youngest. But God decided, at least in this one particular case I illustrate, that those under 20 were not to be held accountable for the sin of disobedience in the desert. Can we apply that specific case to a general principle? Well..., why not? We can just as easily believe we can as that we can't.
Frankly, I hold this view with a somewhat open hand, but I don't think we can rule it out arbitrarily. Perhaps, also, this may serve as some comfort to someone who has lost a child, particularly a teenager, and is troubled by their eternal fate.
PS: This question has a personal side to it. We lost our own granddaughter at the age of four and a half months to crib death. For my thoughts on this season in our family's lives, click on SIDS, below. The series of posts will appear in reverse order.
Update: I have posted a few more thoughts, specifically in relation to the mentally handicapped here.