It is also very telling when religious people ask atheists why they are moral. It's almost as if the implication is that the only reason they do not steal, murder, and rape is because they are frightened of god. Kohlberg would certainly have something to say about this.
Anyway, there are several mechanisms in place, both biologically and philosophically that explain why atheists are often moral people. I will balance this with how I believe faith encourages immorality.
A Secular Morality
1. Via Evolution.
There are god-knows how many papers (both in peer-review and elsewhere) explaining the evolution of morality.
To save you the trouble of looking them up yourself (though I encourage you to do so anyway, so that you can be familiar with some of them), here's the Reader's Digest version.
Your body is composed of various chemical compositions, all of which result in your demeanor. If we introduce certain chemicals to your body, you will instantly become more affable. At one point a long time ago, a group of great apes (which also exhibit morality and are a social species) who shared a disposition to being socially cohesive and to cooperate banded together. Their ability to work as a group would have easily helped them and their progeny to survive and reproduce compared to their more individualistic brethren. This would have selected for this type of chemical make-up in the brains of our ancestors and, therefore, us. Lo and behold, this is precisely what we see with most human beings, and it is a part of our ordinary genetic code. This explains at least the biological facets of human empathy.
2. Personal gain.
This branches from point #1, but life is much harder as a social outcast, which is precisely what one becomes when they steal or such from their neighbors. Once people realize that they have more to gain from being moral, rather than the personal hell they cast themselves into otherwise, there is plenty of reason to be kind to others.
There is so much more, but for now these two should suffice. Richard Carrier is an authority on the subject, and actually tackles it with a bit more humor than I do.
How Faith Fosters Immorality
1. Poor definition of morality.
Questions of morality are questions of human happiness and suffering. The problem with religion, particularly Christianity and Islam, is that they tend to assert that questions of morality are not questions of happiness and suffering.
Evidence of this is in the news daily, and it paints the history of your faith with red. Morality for the faithful is about following god's supposed will, which often shows little concern for what is best for fostering happiness and a sustainable society.
For this reason, Christians on the whole (in political polls, etc) seem to be more concerned with what is "right" than what is good. Again, Kohlberg would probably shed a tear at this point. This is the basis of immoral behavior at the influence of religion.
An example of this is the amount of effort dedicated to gay marriage, where no harm is perceivable, and comparatively how little time is spent by Christians opposing genocide.
2. Religion encourages a failure of our epistemological accountability.
"The worst problem with religious morality is that it often causes good people to act immorally, even while they attempt to alleviate the suffering of others. In Africa, for instance, certain Christians preach against condom use in villages where AIDS is epidemic, and where the only information about condoms comes from the ministry. They also preach the necessity of believing in the divinity of Jesus Christ in places where religious conflict between Christians and Muslims has led to the deaths of millions. Secular volunteers don’t spread ignorance and death in this way. A person need not be evil to preach against condom use in a village decimated by AIDS; he or she need only believe a specific faith-based moral dogma. In such cases we can see that religion can cause good people to be much less good than they might otherwise be."Epistemological accountability represents how people are obligated to hold good reasons for what they believe, lest their good intentions become wickedly immoral. Without the influence of dogmas, we would still have good people doing good things and bad people doing bad things - the kicker is what gets good people to do bad things.
~ Sam Harris
Consider the couple from Wisconsin just last week who decided to treat their daughter's diabetes with prayer. Because they did not have good reasons for what they believe, their good intentions became the murder of their child. It almost makes one sick then, to read this:
"Dale Neumann told investigators that "given the same set of circumstances with another child, he would not waiver in his faith and confidence in the healing power of prayer," according to the interview statement."The man has three other children.
On another extreme, consider the men who flew planes into the Twin Towers. Were they immoral? Very much so. However, I submit to you that their intentions were not bad - they believed, based upon the doctrine of martyrdom found in the Koran and the Hadith, that they were doing one of the best things possible. Of course, as is so often the case, they concerned themselves only with what was "right" in accordance with the scriptures, rather than what was best for humanity.
They have failed in their responsibility to have accurate beliefs, and this has resulted in maladaptive unreason enshrined as god's glory. Irrationality, and the bad ideas born of it, kills people and unmakes good intentions.
This brings me to the final point I'd like to make - where morality does NOT come from, and that is from Christianity and other faiths.
Where Morality Does Not Come From
(Note: Many of these arguments originate with Sam Harris. He also tackles this issue beautifully in his piece The Myth of Secular Moral Chaos.)
Consider even the ten commandments - one would think that upgrading these precepts would be extremely difficult, even impossible. These are the only things that god felt the need to give us himself (carved in stone, no less). However, improving them is not difficult, it is incredibly easy.
Take the 2nd commandment - no graven images. Is this really the second most important thing? You could literally place any edict in place of the second commandment and you would have immediately augmented the wisdom of this supposedly inerrant text. How about "Don't beat your children?" How about "Don't pretend to know things you don't?" How about "Recycle your plastic and glass?"
Beyond that, portions of the ten commandments are flagrantly immoral. If you catch your best friend worshiping a graven image, working on the Sabbath, or committing adultery - you're supposed to kill them (and if you're unwilling to kill them, your neighbors are supposed to kill you). You may say that these things no longer apply (this itself is arguable from a biblical standpoint). It's true that we're no longer burning witches and heretics at the stake, and that's a good thing - but you're still not disavowing the fact that for 4,000 years, this pious cruelty would have been moral under the Christian system. This could all have been prevented if you, myself, or almost any other mere human living in the world today had authored the book.
However, the obvious reason we do not need the bible to establish our moral lives is because it is we who decide what is good in the good book. When we read something like the golden rule in Matthew 7, it is we who decide that this morsel of moral wisdom is a keeper. Conversely, when we read something like Exodus 35:2, which tells us to kill people for working on (what would have then been) Saturday, it is we who decide that this is the most vile lunacy imaginable. The important thing to note here is that we are the keepers of moral judgment even when reading our holy books, and if it is we who are making those calls, why do we need the bible?