if it is a headlight with a hole in the back where you stuff the bulbs in rather than a sealed beam unit then I find the missus' hairdryer works a treat..... certainly dries it out long enough to get through an MOT!!
The cause; a knackered seal, hole in headlight fitting, or someone changed a bulb in wet/damp weather.
The cure; pop a packet of silica gel or other desiccant into the light fitting, somewhere where it cannot be seen or interfere with the light projected.