All Communist governments have several things in common, tyranny, reppression, totalitarianism, and a suppression of religion. Each Communist government in existence has proclaimed atheism. Karl Marx, the founder of Communism himself, called religion an opiate of the masses.
Marx had a rather pessimistic view on religion. He believed that religion was created by the upper class to control those below them. In other words, "You can't oppose us because God says that you must serve us." According to Marx, religion was meant solely to distract the workers and keep them from learning of their "depraved condition."
The Soviet Union under both Lenin and Stalin suppressed religion. The official Communist Party (the Party that ran the Soviet Union) line was Marxist. Therefore, organized religion was ended. Church lands were stolen by the government, clergymen (as Russia was mainly Christian) were imprisoned or executed, private schools were closed, and schoolchildren were indoctrinated to believe that God did not exist. Despite this, the Church survived in these areas, with the now Pope John Paul II championing the Catholic Church's cause in occupied Poland, up to celebrating Mass in all weather outdoors in an open field.
Communist China under Mao Zedong and his predesesors also attempted to scourge religion. He conducted a cultural revolution to rid himself of all threats and to "purify" China. This horrible act was carried out by thousands of brainwashed children wielding the little red book. In it, his soldiers killed clergymen of all religions, burned places of worship, not to mention killed millions of "subversives." Even as recent as today, China has suppressed religion; this summer it was busy jailing members of a religious sect conducting peaceful worship (it called their beliefs dangerous).
Cuba possibly the most pathetic of all of the Communist countries, also suppressed Christianity (again the dominant religion) up until the Pope's visit in the late '90s. Fidel Castro, Cuba's dictator, even claimed that Christmas had to be cancelled because it interfered with crop harvesting! With the arrival of the Pope, Castro attempted to get back into the good graces of the world and allowed open religion again.
Now, it is impossible to destroy religion, people take it very seriously and even give their lives for their beliefs. Therefore, when the Communists ban religion, they replace it with a person. That is, the rulers form a cult of personality around their leader. Stalin made himself into a god for the Soviet Union, everything that turned out well was attributed to him. He even had Lenin's body embalmed after Lenin died so that people could "pray" to him. Mao also formed a cult of personality around him. George Orwell portrays this in his famous dystopia 1984. Big Brother, the all powerful ruler of the world in 1984, was created by the ruling class as a god of sorts. Religion had been completely destroyed, only the Party could be worshipped. Therefore, the Party created a face to rule Oceania, the super-state of Orwell's world. This person was basically worshipped by the people and represented an all-knowing omniprescence. All of Oceania's citizens had their religious drives channeled into serving the State in the form of Big Brother.
Now, why would tyrannous governments want to stop religion. Well, the most obvious answer to that is simple: competition. Communist governments do not want to have to compete for the loyalty of their followers, without God, these governments don't need to worry. Another reason is the "moral barometer." God, whether you believe in Him or not, represents all of the goodness in the world. Contrary to Marx's opinion, religion gives people a reason to fight tyranny, namely that it's wrong. If Communist governments acknowledged the existence of God, then their citizens would realize how horrible their governments really are. This is much too dangerous an option. Instead, God must not exist. To accomplish this, Communists create the "cults of personality" described above to channel all religous drive into the State. The State, represented by a Big Brother or a Stalin or even a Lenin, is the supreme good for which all people must slave for. The government can never be wrong if the government is God! Therefore, it seems that Communists don't not believe in God, they fear Him. Unfortunately for opressors, as time has shown us, the suppressed movement is never destroyed; fortunately some religion or resistance remained, and even thrived, under the tyranny of Communism.