Those who believe that there is no afterlife exist in a world that functions like an electric light. If the switch is on, there is light. If you flick the switch, life is gone. That's it. End of story. Now, don't assume that this viewpoint necessarily dictates that one is an atheist. Mainstream Judaism has no dogma about the afterlife. Some few Christians believe in "soul death." The idea that we live and then we disappear is not reserved just for the atheist. This view is based on a ration and materialist view of the universe.
In many ways this makes sense, it all exists as a way for a rational materialist to look at the observable world. Birth is a beginning. Before birth, our consciousness does not exist. That is the observable, scientific view. All the claptrap about past lives is anecdotal and irredeemably bad evidence. All the theological constructs that result in us somehow "forgetting" our previous existence or consciousness appears to be subtly prevaricating mumbo-jumbo. For the person who views life as a materialist, life begins at consciousness, and death is the end of consciousness. So, what does that mean for a person who wishes to contemplate his own mortality?
If this is the only shot we get, it's flimed in one take, then it has to count. There are no mulligans, no do overs, no mercy and no reward for a job well done. What that means is that, for the person who doesn't believe in an after life, the significance of a life depends on only two things: what you've done and what you leave behind. You see, even if a person does not believe in an after life, he understands that there is a kind of afterlife in the memory of others. We continue to exist as an extension of our deeds in our life.
In Confucianism, there is no dogmatic teaching about an afterlife. Rather, one is exhorted to live a life worthy of becoming, after one dies, a revered ancestor. For instance, if the most notable of my ancestors was a horse thief, he will be remembered for generations as the one who was hanged ignominiously. His example serves as a warning to others. He achieves a destiny after life. But it is preferable to live a live which has significance because, then, our lives will be remembered as examples of nobility, graciousness, humanity. For the person who does not accept the existence of consciousness after death, this is a kind of immortality; it offers meaning to existence that one has added to the sum of happiness in the world.
In addition, since one does not believe in an afterlife, on is unmotivated by an outside force coercing our choices through an offering of either reward or punishment. For example, if one beleves that a sin results in a punishment after death, then one's choice is not a free choice, but it is coerced by an outside figure. The child who does not take a cookie because mother is watching is not making a real choice, he is being trained. On the other hand, a woman who does not cheat on her husband because she is not that kind of person is making a rational choice based on who she is, not some outside dogma.
The person who does not believe in a heaven or hell offering reward or punishment makes ethical choices because they know that they are ethical people and that they must have integrity in order to be real and fulfilled individuals. An immature Christian, for instance, may be thinking that they can commit this particular sin because it offers some temporary happiness, and after all, he is forgiven for his sins anyway. That is, of course, a very immature way of looking at salvation. On the other hand, the mature atheist, looking at the same sin rejects it, not because of reward, or punishment, but because it goes against his understanding of humane behavior. The afrer life has nothing to do with it. The mature and ethical atheist does good for its own sake, because that is the basis of his own personal integrity.
Since one has only one shot at life, the atheist believes that one must make the best of it. Living a desolute lifestyle of gluttony or instant gratification is impossible because that is a waste of the single precious life one has. Instead, on must live as if each moment were gold or diamonds passing through one's fingers because they are singularly unique. The person who believes in no afterlife chooses to make each day count, because life is no rehearsal, and death offers no curtain calls.