There is a sensor that is connected to the right front control arm that could have come loose, Or one of the headlights internal position sensor is not operating. I would check that sensor but I think you will need to bring it to the dealer so they can read out the faults in the Lamp module to see what the problem is.
BMW Technician
BMW Master Certifed level 1 Technican