It's simple, all particles with zero rest mass propagate at the speed to light in all reference frames.
However, particles with zero rest mass have momentum and inertia. This is why solar sails work, among other things. The formula for momentum is p=mv. A particle with a mass of 0 would not have any momentum. Yet, these massless particles do have momentum. Which means that they have mass. They're massless, meaning that they don't have mass, but they do have mass. And it's this big WTF moment that leads us into the concept of relativistic mass and mass-energy equivalence.
The formula E/(c^2) = m is, perhaps, more useful in understanding the principle than the more traditional formulation is.
We know that photons have momentum because we can measure it. We know that photons have energy because we can measure it. And we know that photons are massless.
When using relativistic mass as (m), momentum remains p=mv, just as in Newtonian physics. The momentum of a photon is, thus, is p=m(xc) where x is the relative vector of the photon (since the speed of light is a dimensionless constant, and velocity is a vector).
From there, we can get the formula p/v = m and p/(xc) = m
We know, from measurement, that p = x(the plank constant)/(the wavelength of the photon) and that this equals x(E/c)
So that give us m = x(E/c)/(xc) = xE/x(c^2) = E/c^2.
In other words, the relativistic mass of a photon is equal to it's energy divided by the speed of light squared.
And of course, the energy of the photon equals it's relativistic mass times the speed of light squared. The famous E=mc^2.
At this point, let's say you take a massive object and convert it to photons. E=mc^2 applies here.
There are several ways to do it. Nuclear fission is one, though this is an inefficient and incomplete process, no where near total conversion. Matter-antimatter annihilation is better, probably. No matter how you accomplish it, the energy released by transforming a massive object into massless particles is equal to the lost mass times the speed of light squared.
This is the case because the mass lost in such a conversion will be equal to the relativistic mass of the resulting photons.