Other atheists have pointed out that Christians who ask this question are admitting that only the fear of eternal punishment keeps them from committing the most horrendous of crimes. The question says far more about those Christians than it does about atheists. It makes one suspect that they are dangerous neighbors.
But let's look at this from another perspective: That question is the wrong question.
Philosophically, Christianity is undermined by the problem of evil. But it's also undermined by the problem of good.
We know that atheists do not commit crimes, horrendous or otherwise, at a greater rate than Christians do. In fact, atheists are more law-abiding than Christians. Why, atheists are even more genuinely charitable than theists. Christians who personally know atheists are surely aware that these people tend to be nice, peaceful, law abiding, devoted to their families, and all of the other virtues generally associated with a yearning for Heaven and a dread of Hell.
Clearly, Christians should be asking themselves how their fundamental assumption can be true. Instead of asking atheists what keeps them from doing terrible things, Christians should be asking themselves how they can continue to believe that only the fear of eternal punishment keeps people on the straight and narrow path when evidence surrounds them that this fear is not required. The existence of so many good atheists is sufficient disproof.
The correct question is, "In the face of this evidence, how can I continue to believe that the fear of damnation is essential for moral behavior?" After all, when faced with a wealth of evidence that shows that one of your cherished beliefs is incorrect, the rational, logical, sane reaction is to abandon that belief.
Well, we all know that people don't behave that way. Presenting evidence that undermines someone's beliefs can make that person hold onto those beliefs even more strongly; this is known as the backfire effect. So, pointing out to a Christian that the abundant number of good atheists whose behavior is morally superior to that of most of their Christian neighbors proves that he's wrong to think that only the fear of eternal punishment keeps people from doing evil will only make him insist even more loudly that nothing keeps atheists from being evil because they don't fear damnation.
When asked what keeps them from committing evil, atheists sometimes become defensive. They'll insist that they are, too, good people. They'll quote statistics about the goodness of atheists, as I did above. They'll demonstrate to their own satisfaction that religion is not required for morality and that the Bible is a horrifying chronicle of monstrous evildoing by fictional characters we are supposed to admire and emulate. They will discuss evidence of primitive moral codes among lesser species and the commonality of basic moral ideas across cultures and centuries, demonstrating that morality is not a product of religion and appears to have evolved as a necessary element in the evolution of human society.
I suppose there's nothing wrong with this, except for the "defensive" part. Debating the origin of human moral codes without referring to the Bible is worthwhile, and assuming a posture of moral superiority when debating Christians has its own charms. But we know that none of this will win any debates. Christians will just keep repeating their silliness, often wearing an impervious, bland smile while doing so. (One of them came to our door a few days ago. He insisted that, although he hadn't witnessed it himself, he was convinced that people did levitate, and it was because demons gave them the power to do so. That smile never left his face.)
I think that nonetheless it's worth pointing out that Christians are asking the wrong question because doing so changes the terms of the debate. As I said, the question they do ask, the one mentioned at the beginning, puts atheists on the defensive, puts them in the position of thinking they have to prove something, when in fact they have nothing to prove. We need to turn the debate around by asking Christians how they can continue to claim that fear of eternal punishment is necessary when the existence of so many good atheists proves it's not. To maintain a belief in the face of contrary evidence may be a common human failing, but it remains completely illogical. Force Christians to defend that illogical, irrational position.
Why does this matter? Because fervent Christians, the very ones who will cling to their silliness all the more fervently when presented with contrary evidence, are not the real targets of these debates. The target is those for whom there is still hope: those beginning to doubt, those who never fully committed, those who believe but are nonetheless still responsive to reason (because the backfire effect is very common but not universal; not everyone reacts that way all the time). These are the people of whom we need to ask the right question: "How do you account for the existence of good atheists?"