Although it is true that light has no mass, it does in fact carry energy. This answer is a little more complex than that simple statement though and may require you to have a little basic knowledge on Einstein’s theory of special relativity: the theory that can explain how space and time are linked. E = mc2 is an equation that Einstein used to show that energy and mass are interchangeable.
When you ask whether light has energy, it is probably brought on by the famous equation: E = mc2. But this is merely an abbreviation and special case of the longer equation: E2 = p2c2 + m2c4. The letter ‘E’ represents the energy of the particle (hence: light does carry energy), ‘c’ is the speed of light, and finally ‘m’ is the mass of the particle in question.
Therefore, the above longer equation can tell us that the total energy that a particle has is actually a combination of mass energy and momentum energy. Only when the particle is at rest and P=0, is the shorter equation E = mc2 applicable.
But, because light particles, or photons, have no mass, they actually obey a different abbreviated equation: E = pc, this means they get all of their energy from momentum. This is because they cannot get any energy from their mass, since they have none.
To add even more potential confusion: if the particle has both no mass and is at rest, so both ‘p’ and ‘m’ are equal to 0, then it follows that the total energy is zero, so ‘E’ is 0. But this would mean that an object with no mass and no energy does not exist or is nothing.
Since that is what the question is asking, we are going to debunk it. So, if an object with no mass is to actually exist, it cannot be at rest. This just so happens to be the case with light.
As we know, the speed of light never changes. This speed is 299,792,458m/s. This constant speed is essential for a particle that can never be at rest in order to exist. ‘The speed of light’ is name as such because light can never be any slower, otherwise it would cease to exist or move. This speed is a constant for light, as a massless object, in all frames of reference.
Whenever you turn a lamp on, the speed of light allows the light to illuminate the room in a way that appears immediate, thanks to the speed of light even though it has no mass.
The next question you probably have is how an object can have momentum without mass. That’s a valid question, but one easily answered. Although we refer to light as an object, it is not a tangible one, and is in fact a wave. Since light is a wave and has no mass, its momentum is transported thanks to its literal waving movement.
This can be compared to the ocean. Although each particle of water does have mass, the waves that they create do not. But motion and momentum are carried by these waves, just like the waves of light that carry its momentum. An even better comparison is a wave pool. The mechanism that creates the waves is a solid object, moving in and out.
This object has mass itself and has an effect on the water particles, exerting energy on it. the water particles react in a way that causes them to move.
But the momentum that is carried through the water is carried by the waves themselves. This is similar to the waves of light that carry momentum and energy, even though they are not tangible. Water waves are not tangible, even if the water particles themselves are.
The water wave appears to move, but the water particles will more than likely stay in a similar place. So, the wave is moving along the water particles as a motion as opposed to each wave being a block of water that moves along as a collective. This compares well with the light waves, since the photons will stay in a similar place, but the wave motion allows the light waves to carry both motion and momentum.
This allows the light to carry energy. And this is all done without the light waves having mass. So, to answer the initial question: yes, light has no mass, but it does in fact have energy. And light from the sun will reach and warm Earth thanks to the fact that light’s energy travels along the waves in the form of momentum.