I've done some posts on defining happiness and how important social intimacy might or might not be. Several major magazines, including the Economist and the New York Times Magazine, have recently presented articles on research directed towards defining what happiness might in fact consist of, and a number of new university courses have the study of happiness as their main subject (see "Happiness 101, by D.T. Max). The distinction is frequently made between feeling good (the hedonic treadmill) and doing good. The former creates a hunger for more pleasure while the latter is suggested to be more likely to lead to lasting happiness.
My take on the fact that we frequently experience warm feelings after doing good is that we are experiencing the activation of our evolved affiliative neuro-endrocine repertoire, which has components like the release the neuropeptide oxytocin that promotes bonding and trust (see Feb. 13 post). There seems an obvious evolutionary rationale for the pleasure we take in helping others: groups of humans who develop this trait more highly might be more cooperative and effective in competition with other groups of humans whose members treat each other less sweetly. This, like all evolutionary psychology explanations, is hard to test or prove and thus criticized as pseudoscientific hand waving, but I like it. (There does seem to be a consensus that a major engine driving hominid evolution over the past several hundred thousand years has been competition between groups of humans.)
Such a group selection rationale can be applied also to why humans invent religions (which draw caustic blog posts from dry rationalists)...they wage war against other groups of humans more effectively. I do think David Sloan Wilson has it right on the central importance of group selection to human evolution. Have a look at his article "Testing major evolutionary hypothesis about religion with a random sample" which, along with several of this other recent interesting articles can be downloaded in PDF form from his website. I completely fail to understand the objection of the selfish-gene purists to group selection. Their points are now finding some refutation in mathematical models (cf. Bowles) that show how groups with altruistic genes might be better at waging war.