The important thing to note is that religion is not just a reaction to being poor. That, boiled down and put crudely, is the classic marxist analysis as far as I can tell. People do it for all sorts of other material reasons - Fear of death, childhood indoctrination, something to legitimise bigotry, unable to handle living without a safety net, a means to get off drugs, etc etc. These things will not disappear in a socialist society. Death will still be real and scary to some people. Childhood indoctrination is a problem separate from economics entirely. Fear of a universe without guaranteed happiness in the end is perhaps just a part of our psyche. Recreational use of drugs will be fun before and after the revolution, and some people will still get addicted.
-Alex