Two blog posts that go through some of the points related to this common and completely ridiculous idea:
"Atheism is responsible for the deaths of 100 million people in the 20th Century. Hitler, Stalin, Mao and Pol Pot killed millions of people in the name of atheism. Atheism is the cause of the most repressive, murderous regimes in history."[...]"Atheism is not a movement. No government or country effectuates policy in the name of atheism. Atheism is not even a a proper "ism". It has no guidelines, rules, tenets, or practices. It has no rituals, dogma, holy books or scripture. It cannot replace religion, because it is merely the vacuum created when religion disappears from one's personal beliefs.
Atheism in Stalin's Russia, then, was a mere tool used by Stalin, for the greater good of the state, imposed on the structure of society. It's effect was to strip away the power of the church to oppose his power. It was not a mere lack of belief in gods. Stalin could care less about the individual beliefs of the peasant, his focus was on destroying organized religion".
I challenge anyone to go through [the communists' (etc)] writings, or the writings of their biographers, and find any references to genocide on the grounds of a belief in god.
However, [the theist accusers] would still reason that while the killings perpetrated by these leaders were not done specifically in the furtherance of atheism, it is still because of their atheism that their moral depravity reached the depths witnessed by the entire world. But this still leads to logical fallacy. The world has never experienced a government conceived entirely on the notions of Hume, Spinoza, Paine, Jefferson, Einstein and other free thinkers. [...] But such an experiment has never been done, so it's impossible for the theist to argue that the result would be a negative one."
Regarding biographies and writings, I may add that if it's something the Soviet Union was not renowned for, it was interesting books on Atheism. (Ever heard of one?) I suppose it's because communism had too many similarities to religion, so lengthy criticism of religion would be counterproductive, while simply suppressing religious enemies would business as usual.
And as for the experiment with Hume and Spinoza etc. it is quite clear that the North European secular countries are in relevant fields far better places to live than deeply religious countries. So we don't need an experiment to see what is best from a religious nation and a non-religious nation.
See also this post: