Marx believed religion was a social structure that benefited the elite and enslaved the masses. Taking their cue from Marx, Soviet state policy was a kind of scientific materialism that promoted atheism, and specifically sought to oppress and eradicate Christianity, Judaism, Islam within the former Russian empire.
Ever since the French revolution, State sanctioned atheism has been as oppressive to human conscience as has state theocracy.
If I was forced to choose, I would probably live in the former Soviet Union rather than the Islamic Republic of Iran, but that's only because the USSR had recognizably European features in culture, education, science, and society.
Pluralistic societies which do not promote either atheism or state religion are the gold standard to aspire to, IMO.