I had the same problem on my 2003 320, but it was on the driver's side. I had it serviced under warranty 4 times. They tried new bulbs, changed the ignitor, fuses, etc. It would work fine for a while, and then it would go back to operating intermittently again. The problem would most often occurr in the morning or when the car had been off for more than a few hours. I could usually cycle the lights on and off several times, and it would eventually cut itself on.
The 5th time I took it in, I noticed the light wasn't working when I picked the car up. I asked for the service manager and he went ahead and replaced the entire headlight assembly. I didn't have any problems after that.