I want to draw a distinction between the words "purpose" and "meaning". If there is no "God", no "life after death", and we are merely complex biological machines, then I would submit our lives have no purpose. By this I mean that there is no ultimate goal to our lives. There is no becoming one with "God" or whatever form that purpose might take. That is to say that we live out our lives, and they might well be very satisfactory in terms of pleasures experienced, various satisfactions attained, but ultimately there is no reason for ones existence over and above that which we ourselves give to our lives. On the other hand our lives certainly have meaning due to the aforementioned positive aspects to our existence.
But is having meaning, but no purpose to our lives, enough?
Although I emphatically disagree with Bertrand Russell in the following quote that we are compelled to accept the conclusion he outlines, he nevertheless nicely captures the dissatisfactory consequence of accepting that our lives have no purpose.
If we are mere biological machines, then yes, life has meaning. And I find it absurd for people to suggest that if there is no "God" etc we might as well just kill ourselves now. But nevertheless it remains the case that the Universe and our lives are ultimately to no avail. Whatever goals are achieved, whatever satisfactions are attained, whatever pleasures we experience, ultimately it is all pointless in the grand scheme of things. Eventually the last human being will die, the last sentient being on Earth will die and eventually the earth will be swallowed up by the Sun when it ends its life as a red giant.That Man is the product of causes which had no prevision of the end they were achieving; that his origin, his growth, his hopes and fears, his loves and his beliefs, are but the outcome of accidental collocations of atoms; that no fire, no heroism, no intensity of thought and feeling, can preserve an individual life beyond the grave; that all the labours of the ages, all the devotion, all the inspiration, all the noonday brightness of human genius, are destined to extinction in the vast death of the solar system, and that the whole temple of Man’s achievement must inevitably be buried beneath the debris of a universe in ruins—all these things, if not quite beyond dispute, are yet so nearly certain, that no philosophy which rejects them can hope to stand. Only within the scaffolding of these truths, only on the firm foundation of unyielding despair can the soul’s habitation be safely built.Bertrand Russell (from A Free Man's Worship, 1903)
With the death of the Earth we might legitimately conclude that the whole history of the human race -- every thought, every action, every emotion experienced -- might as well never have occurred.
If we gravitate towards materialism perhaps it is best to put aside such thoughts and lose ourselves in our day to day lives; care about the concrete things in life such as making a living, forming relationships, and just marvel at our fortune to be priveleged to have this brief spark of sentience before the veil of forever nothingness descends upon us.