Neurophysiologist Katherine Rankin at the University of California, San Francisco (my alma mater!) recently discovered that sarcasm is actually an evolutionary survival skill:
More important, we run our lives by social calculation. A favor is mentally recorded and paid back, sometimes many years later. Likewise, insults are marked down on the mental score card in indelible ink. And we are constantly bickering and making up, even with people we love.
Sarcasm, then, is a verbal hammer that connects people in both a negative and positive way. We know that sense of humor is important to relationships; if someone doesn't get your jokes, they aren't likely to be your friend (or at least that's my bottom line about friendship). Sarcasm is simply humor's dark side, and it would be just as disconcerting if a friend didn’t get your snide remarks.
It's also easy to imagine how sarcasm might be selected over time as evolutionarily crucial. Imagine two ancient humans running across the savannah with a hungry lion in pursuit. One guy says to the other, "Are we having fun yet?" and the other just looks blank and stops to figure out what in the world his pal meant by that remark. End of friendship, end of one guy's contribution to the future of the human gene pool.
Link - Thanks Geekazoid!