This m is the same thing that appears in General Relativity (or even Newtonian gravity) as the source of gravitational effects. So light is definitely affected by gravity. Since light has energy, it is also a source of gravitational effects on other objects, although not a very strong one under ordinary circumstances. read more