When we say light (A.K.A. photons) have zero mass, what we really mean is that they have zero "rest" mass.
In E=mc^2, E is the energy of unmoving particles.
For a moving particle, the eqn is~
E^2= (P^2 c^2) + (m^2 c^4)
Now, put m=0 for light in the above eqn, and you get~
E=Pc
So yeah, simply put the photons have zero mass, but they have energy. Just Google you'll get loads of stuff to read about it, or ask your science teacher.
Now, I am just a Middle Schooler, so I do not know much (okay, anything) about quantum physics and/or mechanics, but I do know Einstein's famous theory: E = mc^2 (^ means to the power of). For those of you who don't know what this means, it means "Energy equals mass multiplied by the square of the speed of light". That got me thinking; what is the equivalent energy of light? Since light has no mass, how can we use it to make energy via the use of solar panels? Wouldn't the energy equivalent of light be zero? Please post comments below.