The one mechanism behind all three

Air holds water vapour, and how much it can hold depends on its temperature. Warm air holds more; cold air holds less.

Cool a parcel of air and you eventually reach the point where it cannot hold what it already has. That temperature is the dew point, and below it the surplus water has to go somewhere. On a surface, it goes onto the surface.

So condensation on glass means one thing: the glass is colder than the dew point of the air touching it. Everything else follows from which air is touching which face of the glass.

Which side is it on?

Before doing anything, put a finger on it. The side tells you the cause, and the three causes have nothing to do with each other.

The same physics, three different problems.
WhereCauseIs it a fault?What helps
Inside faceIndoor humidity too high for the glass temperatureNot the window, but worth acting onVentilation, moisture sources, warmer glass
Outside faceOuter pane cooled below the outdoor dew point overnightNo — a sign of good insulationNothing. It clears in the sun
Between panesFailed seal on the sealed unitYesReplacement sealed unit

Inside: the humidity one

This is the one people mean when they say they have a condensation problem, and it is the only one where behaviour makes a difference.

A household generates a surprising amount of water vapour — cooking, showering, drying laundry, houseplants, and simply breathing. Overnight in a closed bedroom the humidity climbs while the heating is off and the glass is at its coldest. Both inputs move the wrong way at the same time, which is why bedroom windows are usually the worst in the house.

Two levers, and using both beats using either:

Lower the humidity. Extractor fans on while cooking and showering, and left running afterwards. Lids on pans. Laundry outside or in a vented dryer, never draped on a radiator. Trickle vents open. Bathroom door closed while the fan runs, so the moisture leaves rather than spreading.

Raise the glass temperature. Do not set the heating back so far overnight that the glass gets very cold. Leave curtains and blinds slightly open at the bottom so room air can reach the glass — a heavy curtain drawn tight makes the glass behind it colder, not warmer. Keep furniture off the wall under a window.

When it is worth taking seriously

A little morning mist that wipes away is normal in winter. Water pooling on the sill every morning, black spotting on the frame or the reveal, or a musty smell means the moisture is persistent enough to support mould, and the ventilation is the thing to fix.

Outside: the counter-intuitive one

Waking up to windows fogged on the outside alarms people, and it is the one case where the answer is to do nothing.

On a clear, calm night a surface facing the open sky radiates heat away and can end up a degree or two colder than the air around it. If the outdoor air is humid, the outer pane drops below the outdoor dew point and dew forms on it — exactly the same dew that forms on a car roof and a lawn on the same night.

The reason it happens on modern windows and not old ones is the insulation. A well-insulated unit lets very little heat from the room reach the outer pane, so nothing is keeping that pane warm and it cools freely to the sky. A single-glazed window is warmed from behind all night and rarely does this.

It shows up on clear calm nights and not cloudy or windy ones, because cloud radiates heat back down and wind mixes the air. It clears within an hour of the sun reaching the glass. There is nothing to fix.

Between the panes: the actual fault

A sealed unit is two panes with a sealed cavity between them, usually holding dry air or argon, with a desiccant in the spacer bar to absorb whatever moisture is left.

When the perimeter seal fails, outside air gets in, the desiccant eventually saturates, and moisture condenses on the inner surfaces of the cavity where nothing can reach it. The tell-tales are a haze that never fully clears, streaks or tide marks between the panes, and sometimes a permanent cloudiness.

No amount of ventilation, heating or dehumidifying touches it, because the wet air is sealed inside the unit. The fix is a new sealed unit; the frame is normally fine, so this is a cheaper job than replacing a window.

Putting numbers on it

Indoor dew point for a warm room, so you can see how little margin there is in winter:

Approximate dew point of indoor air at 20 °C (68 °F). Any glass colder than the dew point will mist.
Indoor humidityDew pointGlass mists below
30%2 °C (36 °F)Rarely, even in a hard frost
40%6 °C (43 °F)Only on cold nights
50%9 °C (48 °F)Most winter nights on single glazing
60%12 °C (54 °F)Easily, including on double glazing
70%14 °C (57 °F)Almost any time the heating is off

Which gives the practical target: keeping indoor humidity in the 40 to 50 percent band moves the dew point below the temperature your glass actually reaches on most winter nights. That band is also the one recommended for comfort, which is convenient — the same setting solves both. What indoor temperature to hold alongside it is covered in the ideal indoor temperature.