The wife's car has had moisture in one of the headlights for years. So I pulled in off and took a look at it. No obvious areas where water might be seeping in. The gasket for the bulb housing seemed loose, but the way the housing mounts, I don't think that could be it. Well, I caulked up the seam between the front and back just in case, and smeared some extra vaseline on the gasket.
Still moisture in there. Perhaps, I didn't fully dry it out before closing it up, or maybe, I'm going about this the wrong way. Could it be it needs venting, so the moisture can get out?
What type of car are we talking about? I have seen vented headlights on cars before. Certainly if it was vented any condensation in there would evaporate and be expelled through the vent. Maybe just drill a tiny hole in the bottom of the light to let the water out?
The lights on my '88 Escort use to get about half full of water then it would splash up on the bulb and blow it. An 1/8" drill bit to the bottom of the housing completely solved the problem. Been dry in there for years now. Just drill about 2 holes in each light and that'll be the end of your moisture problem.
I have heard (and have no idea if it is true) that mystery moisture in headlights can be caused by micro cracks in the plastic that are too small to see, but at highway speeds the wind forces the water through them and into the light. That is why sealing up the edges doesn't always work.
I agree though, drill some small drain holes and the problem self-corrects.