Gravity can cause light to bend due to the curvature of spacetime. According to Einstein's general theory of relativity, massive objects like stars or planets cause a curvature in the fabric of spacetime around them. When light travels through this curved spacetime, its path is affected, resulting in a phenomenon known as gravitational lensing.
The curvature of spacetime can be visualized using the analogy of a stretched rubber sheet. If you place a heavy object, like a bowling ball, on the sheet, it creates a depression in the fabric. If you roll a marble (representing light) across the sheet, its path will be curved as it follows the curvature of the depression caused by the bowling ball.
In the case of gravity's effect on light, when light passes near a massive object, such as a star or a black hole, the spacetime around that object is curved. As a result, the path of light is bent or deflected as it follows the curvature of spacetime. This deflection causes the light to deviate from its original straight path and can result in the phenomenon of gravitational lensing.
Gravitational lensing has been observed and confirmed through astronomical observations. It can cause various effects, such as the distortion or magnification of distant objects, the formation of multiple images of a single source, or the creation of Einstein rings (circular patterns of light) around massive objects.
Notably, the degree of light bending depends on the mass and distance of the object causing the gravitational field. The stronger the gravitational field, the more significant the bending of light will be. This effect has been observed and measured in various astronomical contexts and is considered one of the confirmations of Einstein's theory of general relativity.