I'm a geek; no secret there, I have been all my life. As such, one of the things I do is tell jokes, especially to any women who are around. So far, there has only been one who now screams and runs away when I threaten humour at her, which is a pretty good record. But what good is humour, what use is it for me?
Obvious part first: when you can make people laugh, they are better incluned towards you. Never a bad thing, be it a woman you're trying to impress or a stranger you just met and want to get along with or what have you. Of course, one of the biggest means to sway someones opinion is how you react to their jokes, and especially their laughter. Nothing feels worse than getting a frown when you laugh.
Less obvious part second: it's a filter. It's a way of determining if someone "gets" you or not. Freud was notorious for telling dirty jokes to women he found attractive as a way of determining how receptive they were: it's a fair indicator still. But beyond that, the joke teller can "find their own kind", for instance:
Q: How do you bring a woman to orgasm?
A: Who cares?
is a joke that can be used two ways. In the first, it's among friends (especially female ones) who know you don't actually think that way as a style of insulting banter. Which, by the way, is what you'll probably get back, perhaps in a rejoinder like:
Q: How do you make a guy come?
A: Don't worry about it, he just did.
But the second way, is among semi-strangers, usually all-male, as a measuring stick to see what kind of people they are. What else can you tell them? What political opinions do they have?
Q: How many feminists does it take to change a light bulb?
A: That's not funny.
I can tell that joke to my friends, because they know what my views are already, but I wouldn't tell it where I wasn't sure of my audience.
But that it's another version of a filter only occurred to me recently: they can also be cultural identifiers. I told one joke that revealed the real story behind Cinderella's night out (fairly long and complex, with added bits, so I won't tell it here) to two different people, and one laughed while the other was confused. This is because the punch line is left to the listener to fill in, and only one of the people was familiar with the nursery rhyme "Peter, Peter". The other didn't have a background that included the needed information. Slang terms or very local events or personalities (the local weatherman or a particularly inept robber, for instance) could be another tribal identifier.
Which brought to mind the third filter that humour can have: intelligence. Or rather, knowledge. This joke, for instance, will get you a lot of strange looks and strained laughs if your audience hasn't heard of Heisenberg's Uncertainty Principle. That level of knowledge is very attractive to me, even though I understand tha someone can be perfectly intelligent without knowing (or remembering) who Heisenberg was.
A lot of pop culture humour depends on a certain level of sophistication from the audience, from late night monologues ("Buttafuco! Buttafuco! Buttafuco!" - thanks, Dave) to The Colbert Report (Truthiness, anyone?). Likewise, it's usually only people who have had to deal with, or have thought about, racism that understand (and usually laugh) at this.
The best part about learning all sorts of things, from useless trivia to insider politics to other languages, is that with the more you know, the more likely you are to get the joke.