Marx wrote in "Critique of Hegel's philosophy on the right" the famous quote "religion is the opiate of the masses", which in context, means religion is used by the ruling class to pacify the working class.
He goes on to say:
The abolition of religion as the illusory happiness of the people is the demand for their real happiness. To call on them to give up their illusions about their condition is to call on them to give up a condition that requires illusions
Lenin stated that "Atheism is a natural and inseparable part of Marxism, of the theory and practice of scientific socialism"
There have been religious Communists, and Engels for one, said that the teaching of Jesus were comparable to Utopian Socialism. The Viet Cong and the Communist leadership of Laos are favorably to Buddhism and many Indian Maoists are practising Hindu. And there are also many Jewish COmmunists, though of course, prominent figures like Leon Trotsky were Jewish by ethnicity, not faith.
The persecution of religious institutions was partly in fear of reactionary elements -- when the Orthodox Church had for centuries preach the divine right of the Czar to rule over Russia, it's to be expected that the clergy would not just fall in line. And of course, many saw the overthrow of clergy as natural a part of the revolution as overthrowing capitalists and landlords.
TL;DR. There is a realpolitik reason for fearing reactionaries within religious communities, but mostly it was a part of the ideology that saw religion as an illusion used to make the working class accept their place.
In short, the reason is because most Communist countries attempted to adhere to an orthodox Marxist view within their ideology (at least regarding religion), and thus, as the role of religion is inherently antitheistic in orthodox interpretations of Marxism, such is the view the state adopted. In a purely historiographical context, this is about as far as the question goes - this is, arguably, more of a Political Science or even possibly a Social Science question, of what in Marxist theory leads to an antitheistic (or, at the very least, atheistic) interpretation of religion. At the same time, this isn't a criticism of answers - people answering here are knowledgeable enough on the subject, and are providing sufficiently good answers; and Historians naturally come across and learn many areas of political theory as a part of their work.
The longer answer has already been mentioned - to paraphrase, Marx (and his adherents) saw religion as a force which keeps the people oppressed; happy to accept their lower status with the promise of a future utopia once they were dead if they didn't challenge the status quo, and the reassurance that the status quo was created by an omniscient being (or, as seen more in the Eastern religions, some form of power - karma etc.), in which it is seen as correct and proper to obey such a system. In his eyes, it made a class hierarchy seem legitimate, and made tolerance for a class system easier to bear. It provided, what Marxists call, a false class consciousness - a false belief of the legitimacy of the class system, instilled into the working class, that things deserve to be as they are. Some denominations - such as the Jehovah's Witnesses - even hold the idea of a "Heaven on Earth"/return of Christ concept.
Haralambos and Holborn provide a number of Biblical quotations to back up these interpretations of Marx - for example, "It is easier for a camel to pass through the eye of a needle, than for a rich man to enter the Kingdom of Heaven", and "The rich man at his castle, The poor man at his gate, God made them high and lowly, And ordered their estate" (in the hymn "All Things Bright and Beautiful").
For a few direct quotations, as aforementioned, Marx saw religion as the "opium of the people"; Lenin claimed it as "a kind of spiritual gin" - both, ofcourse, as part of far lengthier full quotes. Marx and Engels in 1957 stated "Religion is only the illusory sun which revolves around man as long as he does not revolve around himself"; and also stated "the parson has ever gone hand in hand with the landlord".
However, despite orthodox Marxist views on religion, there is more scope in some of Engels' work (such as "On the History of Early Christianity"), and there is a rising Neo-Marxist movement that argues religion can be a cause for social change. Ofcourse, Communist regimes stick to the orthodoxy, primarily - as stated, even if some states are tolerant, they don't profess a change to the original.
I'm confused by the "was/is" portion of the question, "is" implying now and there is not currently a Soviet Union. Then assuming we are talking about Russia with respect to now, for which I thought per 2012 information 13% of the population was atheist and 41% are Russian orthodox. So based on this wouldn't atheism pretty much not be the preferred religion? Ive always heard that Russia was a hot bed for christianity. Perhaps I don't understand the question.