According to the Wikipedia entry on Communism and homosexuality:
In 1917 in the Russian Soviet Federative Socialist Republic, Vladimir Lenin decriminalized homosexuality, and allowed openly homosexual people to serve in the government. Joseph Stalin re-criminalized homosexuality in 1933 (Stalin’s criminal code punishing gay men by up to five years in prison with hard labor) and the law withstood through the dissolution of the Soviet Union, and was only repealed in 1993 under Boris Yeltsin.
According to the Wikipedia entry on LGBT history in Russia:
Through the abolishment of old Tsarist laws, the Russian Communist Party effectively legalized no-fault divorce, abortion and homosexuality.
In 1933, Article 121 was added to the criminal code, for the entire Soviet Union, that expressly prohibited only male homosexuality, […] The precise reason for the new law is still in some dispute. Some historians have suggested that Joseph Stalin’s enactment of the anti-gay law was, like his prohibition on abortion, an attempt to increase the Russian birthrate and build a better relationship with the socially conservative Eastern Orthodox Church. Some historians have noted that it was during this time that Soviet propaganda began to depict homosexuality as a sign of fascism, and that Article 121 may have a simple political tool to use against dissidents, irrespective of their true sexual orientation, and to solidify Russian opposition to Nazi Germany, who had broken its treaty with Russia.
Thus, we see an affinity between Stalinism and monotheism, as suggested by Jean Soler in his books QUI EST DIEU ? (WHO IS GOD?) and La violence monothéiste (Monotheistic Violence).