It's obviously true that atheism and communism are closely linked. More communists are atheists that one would reasonably expect by chance. All of the canonical founders of communism (Marx, Engels, Trotsky, Lenin*, and Mao) were atheists, and they all explicitly mentioned their atheism in connection with communism.
*While Stalin is certainly a notable personage in the history of communism, he calls himself a Leninist, and I'm not aware he claims any original contributions to communism.
Clearly there's a correlation between atheism and communism. However, while all causation entails some correlation somewhere (thus a lack of correlation
falsifies a causal hypothesis) we have to investigate more deeply to explain a correlation. If we note that atheism and communism are correlated, we can't just say that atheism
causes communism, or even that communism would be impossible without atheism.
We can look at the issue using evidentiary arguments as well as theoretical arguments. Suppose we hypothesize that atheism does indeed
cause communism. This simplistic hypothesis immediately fails when we see atheists who are not communists. A more sophisticated causal argument is atheism plus something else causes communism. Again, we can falsify this hypothesis by noting people who are communists and not atheists. Just by elimination, we must conclude that something causes communism, and that something also (probably in combination with other factors, since the correlation is not perfect) causes atheism.
(We could, of course
define communism as including atheism: whatever someone believes, it cannot be
communism unless that person is also an atheist. But that's a boring argument and an uninteresting definition.)
We can also look at theoretical arguments. Is there anything about
just believing there is no God that logically entails believing that private property should be abolished and that we should establish the dictatorship of the proletariat? It's doesn't seem possible to conclude the latter from the former. Similarly, it doesn't seem possible to conclude from
just believing there is a God to believing that private property must exist and we should forbid the dictatorship of the proletariat; it seems rather easy to assert that God exists, and She's a communist, and that we should be communists not directly for any specific benefit to humanity (although such benefits might be a happy side-effect) but directly to please God. Indeed there is much in at least the Christian Bible that any Good Communist must read with approval, and many important pre-communist intellectuals (notably Proudhon) explicitly tied Christianity to their political views.
The founders of communism were not just atheists, they were
materialists (materialists tend to be atheists). They were materialists not to arbitrarily rule out spooky, "supernatural" influences, but because they wanted to understand the development of society in scientific, i.e. natural terms. While naturalism doesn't
a priori entail materialism, some sort of materialism (or, if you prefer, physicalism) does seem to be strongly demonstrated by the facts in evidence. Again, materialism is closely linked to communism just as is atheism.
So the question becomes two-fold: does materialism lead to communism? Does materialism by itself lead to "atrocities"?
I'll accept
arguendo that communist governments perpetrated at least
some of the atrocities alleged against them. (I don't consider this a particularly damning admission:
every culture and government that has acquired even a little power has perpetrated atrocities. The atrocities of the explicitly Western Christian governments of the Middle Ages through the beginning of the modern era are well documented, as are the atrocities of the capitalist governments of the modern era. Trying to compare the oceans of blood that have been shed in the name of human stupidity and malice with an eyedropper seems like an exercise in the most extreme futility.)
We can exclude a causal relationship between materialism and communism on the same grounds as we excluded a causal relationship from atheism: we can observe that not all materialists are communists, and not all communists are materialists. This means that we can use the behavior of all self-described materialists as evidence. Similarly, we can observe that while all materialist governments perpetrate atrocities, all
non-materialist governments also perpetrate atrocities. Clearly the specifically materialist component is irrelevant to perpetrating atrocities.
In a theoretical sense we can ask: is there anything about materialism or naturalism that entails that one can or should perpetrate atrocities? Is there anything about non-materialism or supernaturalism that entails one
cannot perpetrate atrocities? Is there anything about materialism plus communism that entails that one can and should perpetrate atrocities?
To even investigate a causal relationship, we must ensure that we define "atrocity" independently of materialism or naturalism. If we define "atrocity" to consist in whole or in part of acting without regard to the commandments of a God, then it is of course impossible by definition for a theist to commit an atrocity. Such a definition, however, is as uninteresting and pointless — and skeptically unpersuasive — as making communism atheistic by definition.
Indeed, I would go a step further: I would define "atrocity" without regard to the
reasons for perpetrating the atrocity. An atrocity is atrocious, i.e. morally unacceptable, even if it were to have the most compelling of reasons. You can talk until you're blue in the face that there were excellent reasons for dropping two atomic bombs on Japanese civilians (and in fact dropping a metric shitload of conventional explosive and incendiary bombs on Japanese and German civilians), I will
still say we have a deep moral obligation to find ways to
not slaughter people in massive numbers. If there were good reasons for doing so in the past, that means only that we have a moral obligation to change those reasons.
If Stalin, for example, really did allow millions of Ukrainians to starve, this is the sort of thing we ought not to do.
Why he might have done so — malice, incompetence or expedient necessity — does not affect the condemnation of the act itself, only our strategy for preventing it in the future. Likewise, if Andrew Jackson really did
forcibly relocate tens of thousands of American Indians, killing thousands in the process, this is the sort of thing we ought not to do, regardless of the reasons he might have done so. It doesn't matter why the United States has killed millions of people in Afghanistan and Iraq and continues to do so: this is the sort of thing we ought not to do. If there are reasons we did so, we must change those reasons.
Looked at this way, even the correlation between materialism and atrocity collapses completely, and the theoretical justification that belief in God even discourages atrocity is made entirely ridiculous: every theistic scripture has its God or Gods not merely tolerating or permitting but actually performing or explicitly commanding people to perform atrocities. Any honest Christian condemnation of Hitler's atrocities must reference not his slaughter of millions of Jews as the sort of thing we ought not to do but rather his failure to fill out the correct "divine paperwork" first. (A cynic might even say the religious condemn Hitler because he didn't win. Had he won, the cynic suspects, the world's religious institutions would have quickly found divine or prophetic justification for Hitler's acts. But clearly such cynical speculation would be
utterly unjustified.)
Obviously, the materialist believes that he can take any action, good, bad or neutral, without fear of supernatural punishment or hope of reward in the hereafter. But the materialist still has a choice of restricting his actions according to some ethical system. A theist obviously believes that there are supernatural consequences for his actions, but he has
the exact same choice as to what he believes his God will reward or punish. Worse yet, if he justifies his beliefs about what God does or doesn't want on ancient scriptures, he has a much more difficult task justifying our modern ethical intuitions than does the theist who wishes to contradict those intuitions.