This is an old and (at best) difficult question to answer. The Bible is not as clear on this issue as we would like. I ran across an interesting article on this subject by Dr. Al Mohler, who is the president of Southern Seminary.
The Salvation of the 'Little Ones': Do Infants who Die Go to Heaven?
He does a nice job of refuting many of the spurious viewpoints, forcing us to consider only what the Bible really says. He then comes to the conclusion that infants who die go to heaven and bases his conclusion upon the election of God. He believes that God in His grace has elected all infants who die, thus they go to heaven. Although this is very interesting viewpoint, I think he makes a couple mistakes in his logic (Let me admit I'm treading on thin ice; by all accounts Dr. Mohler is one of the sharpest apologetic minds in fundamental Christian circles today, so I'm thoroughly outmatched. Not that I plan to let that stop me... :-) First, he notes that non-believers are not judged at the Great White Throne (Rev 20:11-15) based on their original sin, but on their deeds. Although they are judged on such (vs 12), the climax of this judgment is in verse 15, where those whose names are not found in the book of life are thrown into the lake of fire. Eternal condemnation is ultimately based upon their response (or rather their lack of response) to the offer of salvation through Jesus Christ alone. Second, he asserts "young children are incapable of committing sins in the body." I'm not sure what kind of kids he had, but I'd love to trade! I've got two well-trained children, but to assert that they can't sin until they are old enough to understand salvation is ludicrous. It's also illogical; if they can't sin, how can they understand a need for a Savior? Furthermore, Dr. Mohler and I apparently have very different viewpoints on what consitutes "election." I believe God's election is based on His foreknowledge, but as one of my professors, Dr. Caner, has said, the key is to define what is meant by "foreknowledge." I believe foreknowledge means that God, being omniscient, peered into history and saw who would accept salvation through His Son; those who did, He elected. So you can see that from this position, infants cannot be elected; they die before they have a chance to accept salvation. So although I find Dr. Mohler's viewpoint interesting, I can't agree with it.
So what do I believe on this issue? I have come to the same conclusion as Dr. Mohler, but along a different path. I have two defenses. First, my stronger defense is based upon David and Bathsheba's first son (2 Sam 12:15-23). David says "I shall go to him, but he will not return to me." I believe that David expected to find his baby in heaven when he arrived. (The weakness in this position is that this passage is a narrative, not a statement from God; just because someone says something in a narrative does not necessarily make it correct.) Second, my weaker defense is based upon a "Scripture-driven theology" hermeneutic; that is, Scripture drives theology, so use that theology to help shed light on unclear subjects or passages. Scripture drives my theology of God, and Scripture tells me that God is just and fair. More than that, God is merciful and gracious. With these, I tend to believe that God will not hold a baby accountable at the Great White Throne judgment for rejecting Jesus Christ when the child is not capable of understanding; that wouldn't be fair. Likewise I believe He will allow the baby into heaven; that would be mercy and grace. So when I put these two defenses together, I think I have a fairly strong position. But I will admit, it's not a rock-solid position. Like I said, the Scripture is just not as clear as we would like.
[Rabbit Trail: You must careful when using the hermeneutic I mentioned above; you might be tempted to use it to arrive at the conclusion that God will let everyone into heaven. Remember that this hermeneutic is only useful to shed light on unclear subjects or passages. Scripture is very clear that those who reject Jesus will spend eternity in hell (Matt 10:32-33; Acts 4:12; John 14:6).]