I had a headlight that was doing this, especially when raining/humid. Eventually it just stopped working, I put a new bulb and haven't had the problem since. You should swap the bulbs from drivers side to passenger. If the passenger side starts to flicker replace the bulbs as a pair if you want them to match. If the drivers side continues to flicker even after the swap could be the ballast.