Karl Marx stated that religion was the opiate of the masses. He was referring to the way that religion kept workers obedient by promising happiness in the afterlife.
Marx viewed religion as a means to oppress citizens, as it taught them to obey what they are told so that they may have happiness in the afterlife. He felt that religion was used as a tool against citizens to ensure that they did not challenge the capitalist system around them.