The principle of equivalence states that all experiments done in a lab in a uniform gravitational field cannot be distinguished from those done in a lab that is not in a gravitational field but is uniformly accelerating. For the latter case, consider what happens to a laser beam at some height shot perfectly horizontally to the floor, across the accelerating lab. (View this from a nonaccelerating frame outside the lab.) Relative to the height of the laser, where will the laser beam hit the far wall? What does this say about the effect of a gravitational field on light? Does the fact that light has no mass make any difference to the argument?
Credit: University Physics Volume 1 by OpenStax, openstax.org, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Exercises adapted: converted to Kosoma's format, maths re-typeset, some exercises split into parts. Source commit db44eb99e9aa1d918fd8cf182f82ccdece9c7b11.