When it comes to the emotional bases of religious belief we atheists tend to talk most about the theist's attempts to avoid disasters, especially that whole death thing, by sucking up to the invisible superbeing(s). (Then there's the piling on of the imaginary after-death disasters, but that's another issue.)
There is a somewhat less puerile reason for wanting there to be a Big Sky Daddy who made it all, though. This is a pretty amazing universe full of totally cool phenomena, and many feel a strong need for someone to thank for it all.
You have to admit, that's kind of cute, if naive - downright adorable in a child, in fact. In an adult it's a little callow, but essentially harmless and springing from a good impulse. The universe is definitely something to appreciate, and I suppose it's easy to blur the line between that and gratitude. Giving thanks to nothing for everything is probably not a satisfactory substitute, emotionally speaking.
Still, it's not as if there aren't plenty of places to put gratitude. Family, friends, teachers, pets... why try to add gods or honest politicians? No need for it, really.
Anyway, thanks for reading!