Andrew Bosworth (a.k.a. Boz):
Sarcasm “works” because it alludes to a critique without ever actually making it. It shifts the burden of substantiating the criticism as an exercise for the audience and further suggests that if they don’t already understand it then they are deficient. Making a critique implicit is an unassailable rhetorical position. The most socially acceptable response for the group is to go along with it, as you have given them nothing specific to challenge. And if someone does challenge it you can simply demur and say it was “just a joke.”
Last year I tried to explain why I didn’t care much for sarcasm. Boz makes a more cogent (and infinitely more readable!) argument.