whats wrong with my headlight

It is burnt out replace it. Vibration will sometimes cause the two sections of filament to touch each other and the light will start working again. This will only be a temporary situation.
~Michael