loose monitor cable, bad monitor, bad backlight inverter, bad GPU, bad power supply.
I will assume its a laptop though. In which case hook it up to an external monitor. if it doesn't happen the laptop screen, backlight, or bavklight inverter are going, or there's a lose cable. If you point a flashlight at it while its "black" and can still see the screen image I'd say replace the inverter.