The famous atheist and writer Christopher Hitchens died last night from complications with a particularly lethal form of cancer (esophageal). Among the debates leading up to his demise was the related premises of whether a) one should pray for an atheist or b) whether such prayers would matter.
I think an atheist would conclude that b is clearly false. There is no evidence that your prayers matter to other people's health and well-being. Where they would matter is to the prayee. Not the subject of their prayers. It makes them feel like they are involved and concerned about the fate of another human being. Perhaps that is a good thing in and of itself, but it does nothing to actually help. It is a symbolic act. Given my stances on symbolic actions (particularly in politics where such symbolic actions cost taxpayers real money), I find it bordering on repulsive selfishness to do this. I would much rather people instead of praying would donate money or goods to an appropriate cause or volunteer their time to a cause they feel they could contribute to. You know, things that might actually help others instead of demonstrate their concern without actually helping anyone. It costs the prayee nothing to pray really. Presumably they would do that anyway. But it benefits only themselves.
I suppose therefore the answer to a) is something more like, go ahead but don't bother bringing it up. I'm not sure it actually harms anything to do this in either direction really. There's a possible positive benefit in that it shows the dying person that you are at least modestly concerned with their suffering and present plight, though there are far better ways to express this. If you are expending your time praying for something other than their health and well-being, it most certainly does not help anyone but you. I would find people praying for my soul or some other metaphysical invention of their religion, or worse for my deathbed conversion to their chosen religious team, to be completely offensive under such circumstances. And so ultimately my preference would be that you do something else for the dying atheist in your world. Send flowers or a book, or a card. Bring ice cream or pie. Bring vodka or other stiff drinks if they are medically able to imbibe them. Bring laughter. Bring comfort and friendship, and be supportive for their friends and family through a difficult time (both before and after the actual death). For my part, bring discomforting events so that I would know the world continues to be troubled and that suffering is not limited to my own plight. Bring interesting discussions from which we could each learn something. Don't bother bringing your piety and presenting it as a gift. It's kind of like buying other people (whom you hardly know) clothing; it's not even worth the trouble of attempting to return the gift for the gift is so thoughtless and worthless to the receiver of it. I'm not that generous to extend a good deal of courtesy to fake politeness and custom that has no actual real world benefit attached to it. Keep that to yourself along with your "god bless you" when I sneeze. I'm not about to be very moved to thank such expressions and what acknowledgements you would get would likely be unpleasant. Thanks in advance.
(Just to clarify, I find I have few points of political rhetorical agreement with Hitchens. I do not share a need to militantly oppose Islam for instance. At least not over and above any other belief structure centered on metaphysical inventions. Where I do have agreements is that the man seems a hedonist and shares a concern for the value of freedom of the individual. But how these seem to have informed his views on things like economics often baffles me.)