This is a question which often arises in discussions about atheism and Christianity. Here, it is important to be clear about exactly what point is (normally) under discussion when such a question is asked. If the question is whether an atheist can, on her own efforts, make herself righteous and morally acceptable to God, then the answer is clearly "no." Scripture makes clear that "there is none righteous, not even one" (Romans 3:10, NASB).
Can an atheist be a good person? Can an atheist be meaningfully concerned with morality?
However, this is rarely the point under discussion. Normally, when someone asks whether an atheist can be a good, moral person, that person wants to know whether an atheist can live in a way which would generally be considered ethical or decent. Here again, though, we must be careful: how do we define what is meant by "ethical" and "decent"? We clearly cannot mean that the atheist can live in a way which is perfectly compatible with God's Law; not even a believer is capable of this, and only Christ has been able to keep God's Law perfectly (Hebrews 7:26–28).
So, by asking whether an atheist can be a good, moral person, we are not so much interested in whether an atheist can live perfectly or cause themselves to become perfect. We are really asking whether someone can practice deeds which society (in some nebulous sense) would generally consider to be good: feeding the homeless, tending to those who are sick and dying, donating to the poor, and so on. And of course, when we phrase the question this way, we see that there is no reason at all why belief in God is necessary for such activity; an atheist can clearly engage in such good works, without needing to believe in God. These "good" works are not truly good, of course, since they cannot be pleasing to God, and they certainly cannot earn an unbeliever any kind of favor with God. Nevertheless, this is what the question is usually intended to mean, so this is the definition of goodness and morality that we need to work with.
This clarification is important for the following reason: an atheist will often point to the possibility of an unbeliever practicing such good works and try to use this fact to demonstrate that God's existence is not necessary for grounding moral behavior. However, while a Christian can readily concede that an unbeliever can practice good deeds, what the atheist's argument fails to show is that atheism has any plausible account of objective morality. That is to say, the real issue is not whether atheists are capable of morally acceptable behavior, but whether the notion of moral obligation is even meaningful in an atheistic worldview.
And this brings us to the final point: the concept of morality itself—what one ought or ought not to do—is entirely meaningless in an atheistic worldview. Think of it this way: no one would say that the earth's orbiting the sun is morally right or morally wrong: it just is that way. Similarly, no one would argue that gravity is morally wrong because it pulls down instead of up: this is just the way things are. These things are just parts of nature, and there is nothing right or wrong about them.
But if there is no God, then all human actions are merely parts of nature, just like the laws of gravity and planetary orbits. And just as it would be meaningless to say that gravity is morally right or wrong, so it would also be meaningless to assign moral value to human actions, if atheism is true. This means that something like murder, in the atheistic worldview, cannot possibly be seen as morally wrong in any objective sense, and therefore implies that the very notion of moral obligation is meaningless. If there is no God to function as an objective Lawgiver, there is no morality (a discussion of exactly how God's existence undergirds the notion of morality is beyond the scope of this article. Please read more here).
In short, nothing prevents atheists from practicing deeds which most people would consider "good," and in this sense, an atheist can indeed be a good, moral person. Nevertheless, atheists themselves cannot consistently praise anything good or denounce anything evil without implicitly contradicting their own worldview. The best question, therefore, is not whether an atheist can be a good, moral person, but whether such a concept even makes sense in an atheistic worldview. And the best answer is that it simply does not.
How does the moral argument support the existence of God?
How does Christian ethics define morality?
What does moral absolutism say about ethics and morality?
What does moral relativism say about ethics and morality?
Is Christian conduct important to how the unbelieving world views Christ?
Truth about Worldview and Apologetics