Many people seem to think that the scientific worldview is incompatible with spirituality or the afterlife. I disagree. In my view, it simply takes a bit of common sense to see that science and spirituality can actually strengthen each other.
Each person is a unique combination of talents, desires, aspirations, qualities, and skills. But these traits aren't created out of nothing. They have their source in your DNA, inherited from your mother and father, in the values and knowledge you've learned from your parents and teachers, and in the life experiences you've had. All of these different ingredients combine to make up a human soul.
During the course of your life, pieces of your soul are passed on to others. You pass your DNA and knowledge to your children, your values influence the choices of those around you, and your experiences can be shared by telling stories.
Every person also possesses certain unique ideas (or genes) that no one else has. Sometimes one of these ideas proves particularly useful or noble, and other people will be eager to learn it. In this way, new qualities can enter the stream of human evolution.
By the time a person dies, the best qualities that person possessed have likely been passed on to the next generation. Successful and kind people usually tend to have many descendents and students. Flaws can be passed along as well, but they are more often allowed to die than virtues.
From this point of view, life after death is a real, tangible fact. A person is not at all a simple collection of atoms that dissolves into the ground after death. Nor is a person an immaterial soul that floats away to another realm. Instead, all the best qualities that make you up are passed on to future generations, and continue to live as a part of the stream of human evolution.
What I've just explained is a simplified version of Darwin's theory, applied to human genes and culture. I think it has some remarkable similarities to the Jewish view, the Christian view, and the Eastern view of life after death. The passing on of good qualities is equivilent, in my mind, to salvation, heaven, or good karma. The eventual demise of bad qualities is the same as divine judgement, purgatory, or bad karma. The Old Testament rarely mentions heaven or hell, but more often talks about the flourishing or demise of one's descendents. The New Testament teaches that the gospel tends to survive, spread, and grow. Indeed, individuals such as Jesus have lived for millenia in our hearts, so that we can imitate them, while individuals such as Hitler are despised and are not given a place in our hearts.
Many people -- including many scientists -- doubt that human evolution can be described in this way. They sometimes argue that this kind of process would lead to the survival of "selfish" ideas that simply want to spread themselves, like viruses.
But imagine two cultures, one ruled by viral ideas, and another by ideas meant to help the society as a whole. Obviously the latter would prove more successful in the long run, since it would be held together by rules of morality that benefit all its members. This culture would then be more likely to influence cultures around it.
This reasoning should be true all the way down to the individual mind. Ideas that are better at cooperating with other ideas will more often contribute to a well-rounded mind -- the sort of mind that will spread its ideas and values.
(The idea that evolution can favor group-cooperation this way is known as "group selection" and has been under debate in theoretical biology for some time. For more details on this debate see the book "Unto Others" by Elliot Sober and D.S. Wilson. This book cites plentiful evidence that group selection is common in nature.)
As I see it, our oldest religions are collections of values that have persisted for centuries because they have helped individuals and societies flourish. Though many dogmatic religious beliefs should be challenged in light of the changes the world has undergone in the last few centuries, the core principles shared by the world's various religious should certainly not be discarded as rubbish. On the contrary, there has never been a better opportunity to study and compare them.
To make matters more urgent, our current way of life is destroying the environment and consuming resources at an alarming rate. By most estimates, it will be merely a matter of decades before we'll be forced to simplify our lives. Almost all religions and ancient philosophies warn that wealth, power, and worldly success can be dangerous when left unchecked. Perhaps we have a more powerful set of tools for dealing with a collapse than we know.