Could be bad screen or video card, test it with an external monitor, mouse and keyboard. Turn on the system and close the lid quickly. If the same thing happens on the external monitor, it's a bad video card and you need a new motherboard unless your video card is removable (unless you have a good gaming system it won't be), if it works on the external monitor you need to replace the screen or at least check the connections.