This can happen because of these reasons :
1. Your display has gone bad and needs to be replaced. (Most likely this is the issue in your case)
2. The cable connecting the motherboard and the display has a crack or is loose.
3. The graphics card on the motherboard has gone bad.
Connect an external monitor to this laptop and if that works fine then No.3 can be ruled out.
Note: After you plug in external monitor, you might need to press Fn + FX (X =1 to 12) keys to toggle to external monitor. FX is one of the Function keys.
This is not a software problem and needs repair/replacement of the malfunctioning part.
If laptop is in warranty contact HP for free repair. Else take a quote from few shops and then get it repaired.
Feel free to ask any question or concern you may have. I will be glad to help you.
Positive Feedback and BONUS are always appreciated.