(1) It's most likely the display if it happens while slightly twisting the screen (horizontal edge to edge twist),
(2) if it happens while opening and closing the display then most probably the ribbon cable (cable between the screen and computer),
(3) and as mcnumpty23 has suggested if it outputs garbage or no output at all from the external monitor connector then most likely the GPU is failing or it needs to be reballed/resoldered.
I've had similar faults as described in (1) with dell, sony, hp and acer laptops that needed replacement LCD displays.
I've had similar faults as described in (2) with dell, toshiba and sony laptops that needed replacement display cables.
I've had similar faults as described in (3) with apple (G3, G4, Air 1st Gen), Acer and HP laptops that needed replacement GPU/Motherboards or reballing.