I can't remember who said it, but I've always liked the advice "If you can't think what happens next in your story, have two men enter with guns".
Obviously for sitcoms you have the believable equivalent to the reality of the piece, ie if it was the Royle Family, two policemen turn up, or someone comes in with a big dog.