I like the theory that jokes are funny to the extent they enable a discovery of 'shared knowledge' between the teller and audience.
I'll provide a light bulb joke as an example...
Q: How many feminists does it take to change a light bulb? A: That's not funny.
Shared beliefs, when they start complaining about things the audience relates to. Or completely obvious things we haven't noticed. A really funny monologue I saw once was a European comedian remarking how many different meanings can be carried by the word 'ass' and how often they are contradictory. Very clever observation.