As a general rule, modern "atheists" are more accurately termed "materialists", in that they deny not just the existence of "god" but of anything outside of or independent of physical reality. (There are atheists who do not believe this and there are also religions, such as Buddhism, that, while "atheistic" in the sense of denying the existence of an all-powerful Creator, certainly recognize the existence of non-physical realms, entities, and phenomena. Some ancient pagan religions may have also fallen into this category. The manner in which the issues raised in the following discussion would apply to these intermediate cases is unclear, and would probably have to be resolved on a case-by-case basis.)
One of the inevitable logical conclusions of such a denial is that it means that there can be no purpose for the existence of the universe. A materialist universe does not exist for any purpose, it just exists. And the same is true for everything that exists within that universe. In the materialist universe, life, like everything else, is the result of various physical phenomena operating without purpose. A human being is simply a temporary arrangement of matter and energy, of no more inherent significance than any other arrangement.
This is a conclusion that is often unrecognized, or even denied, by many atheists, for the simple reason that human beings are "designed" (whether by God or Natural Selection) to see purpose and meaning in the world around them and to feel a need for purpose and meaning in their own lives. The fact that many atheists do not recognize that the denial of "god" inevitably means a denial of any kind of inherent meaning and purpose in existence is the result of human psychology, not logical reasoning.
Of course, many serious atheists do recognize this fact. They argue that the fact that humans are predisposed towards perceiving and desiring purpose and meaning does not prove that such purpose and meaning actually exist in any objective sense. For these more rigorous atheist thinkers, the honest atheist must simply accept that his existence, like the existence of the universe as a whole, has no objective meaning or purpose, and that the only way one can satisfy the human desire for meaning and purpose is to create one’s own subjective meaning and purpose.
One of the problems that these thinkers run into, however, is that the concepts of purpose and meaning are inextricably tied up with the concepts of morality and ethics. Every moral and ethical system is based upon a system of values, and "value", as a concept, is basically synonymous with purpose. (Thus, certain things are said to have "intrinsic value", i.e. they are valuable "for their own sake" - meaning they are purposes in themselves, whereas other things have only "extrinsic value", i.e. they are valuable only as means towards other purposes.) If we eliminate the possibility of objective purpose from the universe, we are also eliminating objective value. Nothing can have value without purpose and if the only purpose we can give something is subjective, then the only value it can have is subjective as well. This is true for all values, including the value of human life itself. If the only purpose for my own existence is that which I choose to give it, then the only value my life has is that which I choose to give it. This also means that the only value/purpose that the life of another person has is that which I choose to give it. (The fact that the other person chooses to give a different value to his own life is irrelevant. In order for that other person's judgment to matter to anyone other than himself, there would need to be some objective moral authority that obligates me to respect that person's opinion. Of course, I could choose to respect that other person's values, but that would be purely my choice, and would have no more moral significance than my choice of salad dressing.)
No matter how elegantly crafted it may be, no ethical system can have more inherent meaning than that of human beings themselves. If there is no inherent value to human life, then even the most sophisticated ethical system has no more authority than the rules for a board game. Even worse, for board games exist within a broader ethical system that discourages cheating, whereas an ethical system that denies the existence of objective purpose/value exists only in the mind of the human being who imagined it. Breaking the rules of one's own self-created moral system would be akin to cheating at solitaire or using "God mode" in a video game, in that the only downside is that I lose the personal sense of satisfaction that I would get from following the rules that I made up to satisfy values that I made up because they happened to please me at the time.
What we are discussing here are the philosophical consequences of atheism/materialism, not its validity. The fact that, by definition, atheism denies the possibility of any kind of objective meaning and purpose in life does not mean, in of itself, that atheism is wrong.
Moreover, while this may be the unavoidable philosophical consequence of atheism, it doesn't mean that atheists are automatically self-serving nihilists. As any sincerely religious person can testify, the fact that one intellectually recognizes a "truth" does not mean that one will automatically fall into line with all of the necessary implications of that truth. The mere recognition of a "truth" does not free us from the bonds of human psychology. Human beings are "hardwired" for good traits (e.g. love, compassion, loyalty), as much as they are for bad traits (e.g. self-centeredness, greed, pleasure seeking). Religious people are constantly struggling with the conflict between what they believe and what they desire. While the situation is different for an atheist (in that atheism does not obligate one to do or not do anything), it is not at all surprising that the vast majority of atheists generally conform to the moral norms of the society in which they live.
The bigger question is what the long term effect of such a worldview can have on the society as a whole. (I believe that, in of itself, the long term influence of atheism on society is certainly negative. Nevertheless, the world is a complicated place, and in relation to other societal factors, atheism may actually serve a positive role in some ways. Rabbi Abraham Isaac Kook argued along these lines, saying that, among other things, atheism served as a corrective for overemphasis on the negative aspects of religion (e.g. fear of punishment).)
At this point, many atheists will counter by arguing that, even if what we’ve said is true, theism doesn’t really solve the problem either. While it is true that, in a theistic universe, the universe exists for a reason, nevertheless, that reason is the Creator's, not ours. Is there any fundamental reason why we should accept His purpose in creating us as our own purpose for living?
For most religious people, the first response to this question would be that the fact that we owe our very existence (and the existence of everything we value) to God creates an obligation of gratitude towards Him that requires us to conform to His will and obey His commands. However, gratitude alone doesn't fully answer the question. There are limits to the obligation of gratitude. Gratitude cannot obligate us to do that which would render the benefit we have received from the benefactor meaningless. Our gratitude to our Creator for our existence can only extend to that which would not fundamentally undermine the value that we attach to that existence. To the degree that obedience to God's will would diminish the value we attach to our existence, our debt of gratitude to God would be diminished as well. If proper obedience to God is perceived, as it often is (even, tragically, by some religious people), as a slavish, mindless abandonment of all human dignity, then it is difficult, if not impossible, to argue that any degree of gratitude could impose such an obligation.
The key to this question is in our understanding of the nature of God. If we perceive God as a being with needs, wants, and desires (even if those needs are far beyond human comprehension), then we have to entertain the possibility that God created us for some self-serving purpose and that the laws He has imposed upon us are intended to direct us towards serving that purpose. If this were true, then the concerns discussed above about the limits of gratitude would come into play and the case could certainly be made that the demands made by most religions significantly exceed the moral obligation imposed by gratitude.
The traditional perception of God in Judaism, however, is completely different. Seeing God as the source of all existence, God is perceived as being entirely independent of creation, needing nothing whatsoever. From this it follows that the purpose of Creation cannot be self-serving, as God has no needs to serve. The purpose of Creation can only be understood as being purely for the benefit of the created beings. The same would also apply to the laws revealed by God. These laws do not direct us to serve God (in the sense of serving to satisfy some kind of Divine need or desire), rather they direct us towards achieving the ultimate good for which He created us. From this perspective, to reject God's purpose in our creation would be fundamentally irrational as, by definition, it means that you are turning away from the ultimate good (for both yourself and for the world as a whole) in favor of some far lesser, and arguably detrimental, purpose.
It is at this point that gratitude comes into play. Once we recognize that God brought us into existence and gave us His laws for our own benefit (even if we do not understand what that benefit is), then obedience to God's will is not demeaning at all but the result of rational assessment of our own best interests. In such a case, to refuse to obey God's will is not only irrational and self-destructive, but also ungrateful.