Title says all...
I think it's a really interesting question.
The sound is almost always a key element in making a horror movie scary and a thriller intense. But in comedies sound is quite often a bit of a neglected art.
I often think of a quote from Randy Thom saying something like this: "There's an infinite amount of sounds that can portray the negative feelings in the human condition. But there's only one positive sound: Birds singing." A quite thought-provoking statement (which, of course, is tongue-in-cheek but very thought-provoking anyway).
For me, Jacques Tati did some of the funniest comedies and his humour was totally sound-based. Check out Playtime, which is a masterpiece of foley, in my opinion. Tati never recorded sound on set as he wanted to be able to control every element of the soundtrack.
There's also lots of humour in the old Looney Tunes cartoons. Treg Brown was a master of his craft and extremely inventive.
What's the funniest soundtrack you guys have experienced?
Context, context, context.
Contradiction and exaggeration.
context, timing, character, juxtaposition, tradition, history....
humour, like beauty, is in the eye/ear of the beholder
Repetition -> Expectation --> Surprise!
Interesting question. You could probably study stand up comedy to learn a bit about comedic tension, release. Returning to a previous punchline. Playing with "taboos".
If anyone's delved into animation, one of the techniques you encounter is "Anticipation". It plays to our expectations of how an action will play out by establishing a strong pose or, like what MtL said, repetition. Anticipation's often used to create visual gags (Wiley Coyote is poised to go zooming off screen, when instead an anvil crushes him), and I believe that the mechanics behind what works in one medium can be translated into another. I guess a quick example would be a strong, serious Timpani roll, climaxing in... a kazoo ensemble.
timing is almost everything.
When I do sounds for a comedy in foley, I always search the kinds frequencies that will tickle the audience. Like a slap- slightly more attack and higher pitched. A body fall- less low end more mid and larger. And as Iain McGregor said- contradiction and exaggeration. Play against thye image is also fun- something unexpected.