One of David's sons died in infancy. David mourned him before he died, but stopped grieving when the child died. This puzzled the servants of David. When asked about his odd behavior:
2 Samuel 12:22-23
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? 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.
A large number of people use this as a prooftext for the idea either that infants of believers (or all infants) who die in infancy will be saved. There are three main problems with that argument:
1) Go to him in Heaven?
The verse just says "go to him." It doesn't say "go to him, in heaven." It does not indicate that David thinks he will join his son in Paradise. Furthermore, David's calm is not produced by joy. David does not rejoice that his son is in heaven. He just submitted to the providence of God and went about his business:
2 Samuel 12:19-20
But when David saw that his servants whispered, David perceived that the child was dead: therefore David said unto his servants, "Is the child dead?"
And they said, "He is dead."
Then David arose from the earth, and washed, and anointed himself, and changed his apparel, and came into the house of the LORD, and worshipped: then he came to his own house; and when he required, they set bread before him, and he did eat.
As one of my friends who uses the handle "Hobster," recently pointed out. David may simply have meant that he was going to be joining his son in the grave. In the Hebrew mind, we see this kind of thought. For example:
1 Kings 2:10 So David slept with his fathers, and was buried in the city of David.
In case you think this is a good thing, note that it is also said of wicked king Ahab:
1 Kings 22:40 So Ahab slept with his fathers; and Ahaziah his son reigned in his stead.
2) Go to him in Hell?
As noted above, David doesn't say where he thinks the child is going. He also doesn't say where he thinks he himself is going. He has just sinned grievously, and we are not specifically told whether David has assurance of salvation at this time. I suppose he ought to, but we are not told that he does have such assurance. If David does not have assurance of salvation, then this verse would seem to have either same general "go to the grave" concept, or perhaps a more sinister concept of going to the place of the damned.
3) Is David Inspired?
The text of Scripture is inspired, but the text is an historical narrative. It tells us what David said, but it does not specifically endorse what David said. Even if David meant he would see his child in heaven, we could not necessarily conclude that David was right as opposed simply to David being optimistic.
We don't know for sure where David's son went. It would not be wise, therefore, to build a doctrine regarding the salvation of infants on this verse alone. David's resignation and lack of joy (ending his weeping and fasting, not putting on a celebration) suggest that he had simply accepted the punishment of God, rather than having any particular hope as to the salvation of his son.
That is not, of course, to say that I think I've proved that David definitely didn't mean what so many softhearted folks would like to think he means. David thinking that his son was in heaven hasn't been proved wrong, and perhaps the comments by David were put there for us to adopt.
Regardless of whether one adopts the highly optimistic view that David thought his son was saved, one should heed David's argument. While a child is alive, pray for its health and welfare. Once it is dead, it is too late. Accept the chastisement of God (if it is that, as it was in David's case) and resist the temptation placed before you to be angry with God. Go, wash up, clean your face, worship God and go about your business. That's easy for me to say, but it is also the right thing to do.