There are several reasons why this could be happening. First, turn off the light switch and check to see if the bulb is screwed in correctly. If so, it could potentially be faulty wiring or a broken switch. It's best to call out an electrician because loose wiring is the number one cause of home fires.