The atheist who does good deeds is worse than the one who kills his mother and takes care of dogs
Question

                What is the reason for people not believing in God being punished? I read that good deeds of such people will not be accepted. So if someone does all he can do to help people and be useful to the society, he will be punished nevertheless if he did not believe in God. But what exactly is the reason of punishing a good man for his atheism?
Praise be to Allah.It is the matter of common sense that man 
          has been created, and the created being must have a Creator. The Creator 
          of man is Allaah, Who created the heavens and the earth, and created 
          all things. Man has to acknowledge this reality. It is also the matter 
          of common sense that the Creator of this universe is the One who deserves 
          to be worshipped, obeyed, feared, hoped and loved. This means that the 
          one who does not acknowledge this truth is an atheist and a denier, 
          and is ignorant and corrupt; his intellect is less than human. Whoever 
          does not submit truly as a slave to Allaah, Who has created the heavens 
          and the earth, but is too proud to worship Him, or worships some created 
          being alongside Him, is refusing to worship Allaah, or is a mushrik 
          (one who associates others in worship with Him). Both the one who refuses 
          to worship Allaah and the one who associates others in worship with 
          Him are kaafirs (disbelievers), like atheists and deniers. Whoever denies 
          the Creator or refuses to worship Him, or joins others in worship with 
          Him, deserves the most severe punishment, because for a man to deny 
          his Creator, or refuse to worship Him, or join others in worship with 
          Him, is the most serious of human sins, the most abhorrent of beliefs 
          and the worst deviation. If a person is like this, there is no value 
          in any good deed that he does. The atheist who does deeds that are good 
          in his own eyes, and does whatever good deeds he can for his society, 
          is like a man who kills his father and mother and takes good care of 
          dogs. Does it not make sense that he should be punished and that his 
          good treatment of dogs should not count for anything?  The most 
          important rights are the rights of Allaah, which are that He should 
          be acknowledged and worshipped. The one who neglects this most important 
          right will not benefit from anything he does with regard to people’s 
          rights. Therefore if the atheist does not believe in Allaah and does 
          not worship Allaah, there cannot be any good in the actions that he 
          does for people’s benefit. But this atheist or mushrik who treats people 
          well is still better than the atheist or mushrik who oppresses and mistreats 
          people, and denies them their rights. He may be rewarded for his good 
          deeds by being granted provision of food and drink in this world, but 
          he will have no share in the Hereafter. Look at yourself, and believe 
          in Allaah and His Messenger, and follow the guidance of Allaah with 
          which He sent His Messenger  (peace 
          and blessings of Allaah be upon him), the Seal of the Prophets, so that 
          you might avoid the punishment of Allaah. Know the difference between 
          the believer and the atheist, the one who worships Allaah alone and 
          the one who associates others in worship with Him. Allaah says (interpretation 
          of the meaning): 
“The 
          likeness of the two parties is as the blind and the deaf and the seer 
          and the hearer. Are they equal when compared? Will you not then take 
          heed?[Hood 
          11:24]