The above posts already hit on some good points. For me, the bridge is all about adding something in contrast with the repetition of the rest of the song. The simple verse-chorus-verse-chorus type structure works great for some songs, but it can get monotonous on others. That's when I try to bring in a bridge.
There are a lot of terms used to describe these contrasting sections: bridge, breakdown, interlude, etc. It seems like "bridge" usually refers to a section with lyrics, whereas "interlude" or "breakdown" would be used for an instrumental section. That's just my interpretation, and at the end of the day I don't think it matters what you call it.
Bridges tend to be on the shorter side in popular music (4-8 bars or so), probably because it doesn't offer the same striking contrast if it drags on and on. I'm sure there are a ton of exceptions, so follow your ears and intuition. I think the main thing is just to do something different.
Some things you might try:
- Different chord progression/melody. For example, on a happy song, maybe focus on minor chords in the chorus.
- New lyrical structure. This one might work well with the different progression/melody approach.
- Change the intensity. When coming out of a powerful chorus, strip the song down and bring instruments back in as you build it up to a final chorus.. that sort of thing
- Key change!