Atheist writer Karl Reitz has the following interesting atheistic defense of religion:
Religion has been under more fire than usual lately [by writers such as Daniel Dennett, Sam Harris, and Christopher Hitchens]....
Most reviews of these books and interviews with the authors have raised the not-so-hot record of atheistic societies. The authors, of course, promptly dismiss these concerns. As The Economist review of Mr. Hitchens "God is not Great" puts it:
"To the objection that irreligious fascists and communists found plenty of non-religious reasons for murder in the 20th century, Mr Hitchens retorts that these beliefs were types of secularised religion, and as such do not count."
However, it is not clear at all why "secularized religions" should not count. A world in which everyone stopped believing in God would likely provide fertile ground for such secular faiths. These secularized religions are what we would really have if we somehow got everyone to stop believing in God....
The obvious examples of secularized religions are communism, socialism, and fascism, each of which generally involves worshipping government by slightly different rituals or for slightly different reasons......
Even if the secular authors' ire is well-justified, we are never going to live in a world in which the vast majority of people don't have faith in something, whether that something is God or Government. As an atheist I feel much less threatened by someone who is willing to put off perfection by relegating it to another place than I do by someone who thinks they can create it here and now.
Reitz is certainly correct in concluding that many religions are less harmful than the very worst atheistic ideologies, such as communism (though he is wrong to assert that "fascism" was an atheistic ideology; most fascists, including Adolf Hitler, believed in God, and some, such as Franco were supported by the religious establishment in their societies). But Reitz is wrong to assume that "secularized religions" such as communism are the only realistic alternatives to traditional religious belief. Reitz does not deny that atheism is in fact compatible with a wide range of views on moral and political issues (a point which I defended in detail here). But he appears to assume that the an embrace of harmful secular ideologies is the most likely result of widespread atheism. Empirically, this is false. There are numerous majority-atheist nations that show no signs of falling prey to communism or other similar ideologies. Consider the cases of Japan, the Czech Republic, and Denmark, among others - in all of which atheists are the majority of the population (for detailed stats, see here). Even in those countries where majority atheism was combined with horrendous totalitarian rule, it does not follow that atheism caused the atrocities. Indeed, communists seized power in Russia and elsewhere at a time when populations of those countries were overwhelmingly religious. It was the rise of communism which caused the rise of atheism in these countries, not the other way around. Officially imposed atheism was just one facet of a broader totalitarian ideology. And atheism certainly does not entail "worshipping government." Many of the greatest advocates of libertarianism - including Hayek, Friedman, and Ayn Rand - were atheists.
Finally, Reitz is overly dismissive of the possibility that religious ideology can also lead to totalitarianism and other abuses. He appears to believe that religious folk are immune to such temptations because they relegate the search for utopian "perfection" to the afterlife rather than trying to "create it here and now." Some believers do indeed fit this characterization. But many do not. Osama Bin Laden is just one example of a religious believer who clearly does think that he has a religious duty to help his God create perfection by acting in the "here and now." Even communism, the classic example of a secular totalitarian ideology, had its religious supporters, such as the "liberation theologists."
Both religious and secular ideologies can lead to horrible oppression. It depends on the details of the ideology in question. The spread of atheism does not in and of itself make such an outcome more likely. Neither does religious belief somehow immunize a society against it.
Atheists should oppose government-imposed atheism, just as we should be against government imposition of religion. But there is no reason to believe that the voluntary adoption of atheism poses any greater risk of spreading harmful ideologies than does voluntary adherence to religious beliefs.
UPDATE: The original text of this post accidentally misidentified Daniel Dennett as "Brian Dennett." I have now corrected the error, which was helpfully pointed out by commenters.