Just happened by this advice by Mr Jacob. 'Tis good advice. You should read it.
In essence, the purpose of dramatic dialogue is to advance plot and illuminate character. In a comedy, dialogue should also be funny. Audience sitcom demands that it should be laugh-out-loud funny several times a page. Non-audience sitcom needs to maintain a level of funniness, and while one expects laughter, the frequency of laugh lines can be less. (If a non-audience sitcom is incessantly hilarious, then it should probably be made with an audience).
In thinking about the basic elements of comedy as the college scheme progresses, I find it impossible to avoid falling back on tradition, and the traditional view of dialogue is that every line should advance the story, just as every scene should have a point. In her talk to the last workshop, Susan Nickson cited John Sullivan as saying that if a show over-runs, cut the jokes, not the story. So it's worth considering the difference between funny lines and jokes.
At a commissioning meeting, discussing a script that I'm developing, I was told that there were too many jokes. This seemed a rather odd note for an audience sitcom, but what the comment meant was that there were too many obvious 'jokes', designed to get a laugh, rather than funny lines which would make an audience laugh, be true to the characters, and advance or comment on the story.
It should be absolutely clear in a script which character is speaking (there's an old reader's trick of blocking out character names and seeing if one can work out who is who from dialogue alone). Many new writers haven't quite mastered the art of different voices, so it feels that every character is speaking in the writer's voice, and that the characters have not been defined clearly enough. They are pawns rather than people.
Good dialogue is economical, with not a word wasted, and while dialogue should obviously convey information, it should be information with attitude rather than information alone. People telling each other stuff is dull, and people telling each other stuff that they should already know is just bad. Attitude is crucial.
The novelist Anthony Powell felt that one of the keys to avoiding the exposition trap was that questions should never be answered directly, which is a handy tip.
Clear characterisation leads to clear voices which allows actors to understand, and even add to, what they are being asked to play. Workshopping a script with a well-known actress was a tedious experience since she wanted to keep trying accents. The reason wasn't because the actress was being a diva, but because she couldn't grasp the character from the writing. When actors understand, they sell the words, even though they may not deliver them the way the writer heard them. But that's another story.
I think a useful thing to do - because I think it's very useful for people to analyse for themselves how things work - is to take a show that you like and that has worked for an audience - and examine the mechanism. Think about how characters have different voices, look at attitude, look at where the laugh lines come and look at how dialogue works with action and the physical.