Tom Jacobs finds an answer in recent research from Will Gervais:
Gervais and his colleagues approach this phenomenon from an evolutionary perspective. “A number of researchers have argued that religious beliefs may have been one of several mechanisms allowing people to cooperate in large groups, by in effect outsourcing social monitoring and punishment to supernatural agents,” they write. Religion, in other words, has served a specific function throughout much of human history (beyond assuaging existential fears): It keeps people in line, discouraging them from engaging in selfish acts that hurt the larger community.
Jacobs acknowledges that there's no evidence backing up the assumption that atheists are less moral and elaborates on evidence to the contrary. Talking about Gervais' research a while back, Tom Rees offered his own explanation:
I think there is a special feature of atheism that separates it from many other kinds of predjudice – and that's the fact that atheism is a choice. When there are only very few atheists, then the only people who are going to 'come out' as atheists are likely to be those who are a little maverick. If lots of people choose to be atheists, then it's clearly something that 'normal' people do. In other words, distrust of atheists when they are a tiny minority might well be a perfectly rational rule of thumb!
Hemant Mehta rounds up other theories.