Many of the headlights on modern day vehicles can suffer from moisture build-up, which apart from impeding the light source and giving you a clear beam, can also bring about a fail when the vehicle comes up for its annual MOT.
This issue can come about in a couple of ways. Firstly the lens has sprung a leak allowing moisture to get in, but secondly it can be down to changing temperatures and has the same effect as what happens to a single glazed window when its cold on the outside, but warm on the inside.
Replacing modern day lenses is expensive. For a typical BMW a new lens would cost hundreds of pounds. Buying one from a breakers yard, albeit much cheaper might put you back in the same position of having one that mists up. So, is there an alternative?
Normally these lenses have a vent and these vents can become blocked preventing air from circulating the lens. These vents are created to only let in air not water, so generally they are quite small. But over time they may get clogged up and prevent air from getting in and keeping the lens moisture free.
So firstly it's a good idea to check the lens to make sure there are no chips or cracks allowing rain to get in. If all is ok with that, then locate the vent and make sure it's not clogged, if it is, simply clean it out by using a wire or something similar. Now, assuming all is good with the lens and the vent you may want to try taking the bulb caps off, see picture below:
Most look much like this. Then run the vehicle around for a couple of days to see if the moisture clears. Whilst the caps are off, try not to use the vehicle in heavy rain, or going through a car wash as you may end up with water in the lens unit and that could have consequences with your electrics. If, the lens clears the moisture and does so within a couple of days it could point to the fact that somehow moisture is still getting in to the lens, or the venting of air is not working and either or both of these lead to moisture build-up.