To me, the connection between communism and atheism is obvious and direct.
Before I'm a communist, before I'm an atheist, I love the truth, and I believe the truth matters. And it's true that no god exists, there is no afterlife, there are no purposes or ethical standards external to human thought. There's no reason for being at all, there is only the fact of our individual existence. I'm a communist because communism rests comfortably on the truth, whereas capitalism does not. One can support communism (or anything at all) with lies and bullshit, but one must support capitalism with lies and bullshit.
Indeed, one can support anything at all — truth or falsity, good or evil, profundity or triviality — with lies and bullshit, and therein lies the rub. I won't condone lies and bullshit in support of communism not just because I love the truth, but because the same lies and bullshit that support communism today can just as easily support tyranny, exploitation and oppression tomorrow, because lies and bullshit can support anything.
If we implement communism today because we believe God — not humanity — wants communism, then what happens tomorrow when we believe that God wants the subjugation of women under communism, or the oppression and marginalization of gays? What if tomorrow God wants us to sacrifice our material comfort for the sake of sacrificing our material comfort... turning, of course, a blind eye to the material comfort of some privileged elite? If the value to humanity is not a good enough reason today to justify the first steps towards communism, why will it be a good enough reason tomorrow to continue the class struggle and take the next step?
I like self-interest. I'm a communist because I believe communism is in everyone's self-interest. But rationality and truth is the only counter to the tendency of mutual self-interest to narrow to class or individual privilege.
The problem with religion, any religion, is that some privileged elite almost always has to speak for God. Some preacher, some priest, some theologian, has to tell us that he knows better than we do what God wants, and we'd better comply if we want to get on the right side of God. Such justification must necessarily come at the expense of humanity and rational, mutual self-interest: if we could justify some belief by appeal to humanity and self-interest, why even bother to invoke God? I don't claim divine revelation to justify gravity; I appeal to experiment and observation.
Even "gnostic" religion, religion available to everyone, is dangerous. How am I to separate my own personal preferences from "that of God speaking to me"? Even a gnostic religion — if it is to be any religion at all — must hold that some dictates of my conscience are authoritative and beyond the bounds of rational criticism.
It's none of my business if some individual is a communist because he believes that God wants communism. It doesn't matter whether I think he's rational or irrational. I'll be happy to work with him in building a rational, just and good society.
The problem comes when he — or anyone else — demands that I myself sacrifice the truth to preserve his sensibilities. This I will not do, even if it sets back the cause of communism by a thousand years. It's better to set back communism than set back the truth.