The first reference comes from 2 Samuel, where David is mourning the death of the child born to he and Bathsheba. David knows that the child is with the Lord in heaven.
2 Samuel 12:22-23 (KJV)
22 And he said, While the child was yet alive, I fasted and wept: for I said, Who can tell whether GOD will be gracious to me, that the child may live? 23 But now he is dead, wherefore should I fast? can I bring him back again? I shall go to him, but he shall not return to me.The second reference comes from the Old Testament and is a prophecy that refers to a New Testament event: the murder of all the children two years of age and younger by Herod in his attempt to kill Jesus.
15 Thus saith the LORD; A voice was heard in Ramah, lamentation, and bitter weeping; Rahel weeping for her children refused to be comforted for her children, because they were not. 16 Thus saith the LORD; Refrain thy voice from weeping, and thine eyes from tears: for thy work shall be rewarded, saith the LORD; and they shall come again from the land of the enemy. 17 And there is hope in thine end, saith the LORD, that thy children shall come again to their own border.
The third reference comes from Matthew as Jesus is interacting with little children. The Greek word used for “little children” refers to infants or very young children.
Matthew 19:13-14 (KJV)
13 Then were there brought unto him little children, that he should put his hands on them, and pray: and the disciples rebuked them. 14 But Jesus said, Suffer little children, and forbid them not, to come unto me: for of such is the kingdom of heaven.A similar reference is in Mark 10:13-16, where we are told Jesus actually took these little children up into His arms (demonstrating how young they were):
13 And they brought young children to him, that he should touch them: and his disciples rebuked those that brought them. 14 But when Jesus saw it, he was much displeased, and said unto them, Suffer the little children to come unto me, and forbid them not: for of such is the kingdom of God. 15 Verily I say unto you, Whosoever shall not receive the kingdom of God as a little child, he shall not enter therein. 16 And he took them up in his arms, put his hands upon them, and blessed them.The same Greek word is used to refer to the infant Jesus when Herod encouraged the Wise Men to find Him.
I believe that “Of such is the kingdom of heaven” means exactly that: a significant portion of heaven will be comprised of infants and little children. An infant is too young to place their faith in the Lord Jesus Christ, and as such, when an unborn child or an infant dies, they are safe in the Lord Jesus.
As to when they reach an age that they are accountable for their sins before God: I do not know exactly when that age is. But I believe God, in His justice does know exactly what that age is for each person.