The statement that gravity has no effect on light is not entirely accurate. In fact, according to Einstein's theory of general relativity, gravity does influence the path of light. This phenomenon is known as gravitational lensing, where the gravitational field of massive objects, such as stars or galaxies, bends the path of light as it passes by them.
The reason light is affected by gravity is that according to general relativity, gravity is not simply a force pulling objects toward each other, but rather the curvature of spacetime caused by the presence of mass and energy. As light travels through spacetime, its path is affected by the curvature, causing it to follow a curved trajectory around massive objects.
However, it is true that gravity does not directly affect the propagation of sound waves. Sound is a mechanical wave that requires a medium, such as air, water, or solid materials, to propagate. Gravity primarily acts on mass and energy, and it does not have a direct effect on the medium through which sound waves travel. Therefore, gravity does not significantly influence the behavior or properties of sound waves.
In summary, while gravity does affect the path of light through gravitational lensing, it does not directly impact the propagation of sound waves since gravity acts primarily on mass and energy rather than the medium through which sound travels.