Religion can be used to legitimize suffering; it teaches people that while their lives may be awful now they will be amazing in the afterlife. Marx believed that religion convinced it followers that their problems were being solved, when in fact any 'real' problems were only being masked (just like drugs), and this is something I agree with!
If we take world religion it takes back to long history. So it is not simple as Karl Marx says. Whoever takes opium cannot lead good life. Those who follow religion are good people. Therefore if the religion is the opium then it would not made people good. So i can say that religion is not the opium of the people.
Religion causes a lot of trouble for people. It is not simply an opiate. A lot of people feel a sense of guilt and repentance from sins which their religion says they committed. If religion were an opiate, it would make people happy all the time. Religion is a lot more complex than Marx gave it credit for.