Religious theists regularly insist that their religion and their god are necessary for morality. What they don't seem to recognize, however, is the fact that the morality promoted by traditional, theistic religion is corrosive to what genuine morality should be. Religious morality, like that in Christianity, teaches humans to be good for the sake of reward in heaven and to avoid punishment in hell. Such a system of reward and punishment may make people more pragmatic, but not more moral.
Albert Einstein recognized this and frequently pointed out that promising rewards in heaven or punishment in hell was no way to create a foundation for morality. He even argued that it wasn't a proper foundation for "true" religion:
If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed. The further the spiritual evolution of mankind advances, the more certain it seems to me that the path to genuine religiosity does not lie through the fear of life, and the fear of death, and blind faith, but through striving after rational knowledge.
Immortality? There are two kinds. The first lives in the imagination of the people, and is thus an illusion. There is a relative immortality which may conserve the memory of an individual for some generations. But there is only one true immortality, on a cosmic scale, and that is the immortality of the cosmos itself. There is no other.
quoted in: All the Questions You Ever Wanted to Ask American Atheists, by Madalyn Murray O'Hair
People hope for immortality in heaven, but this sort of hope makes them complicit in the corrosion of their natural moral sense. Rather than wishing for a reward in the afterlife for all their good deeds, they should focus instead on those deeds themselves. People should strive for knowledge and understanding, not an afterlife which can't reasonably exist anyway.
Immortality in some sort of afterlife is an important aspect of most religions, and especially theistic religions. The falsehood of this belief helps demonstrate that these religions must themselves be false as well. Too much obsession about how one will spend the afterlife prevents people from spending enough time on making this life more livable for themselves and for others.
Albert Einstein's comment about "genuine religiosity" has to be understood in the context of his beliefs about religion. Einstein is wrong if we simply look at religion as it exists in human history - there is nothing "false" about religiosity which incorporates fear of life and fear of death. On the contrary, they have been consistent and important aspects of religion throughout human history.
Einstein, though, treated religion more as a matter of having reverence for the mystery of the cosmos and seeking to understand what little we might be capable of. For Einstein, then, the pursuit of the natural sciences was in a sense a "religious" quest - not religious in the traditional sense, but more in an abstract and metaphorical sense. He would have liked to see traditional religions give up their primitive superstitions and move more towards his position, but it seems unlikely that this will occur.