This question already has an answer here:
It's a somewhat theoretical question. In special relativity, The energy of a photon is given by $E = pc$. But, my argument is that, since photons have no mass, how can they have a momentum $p$? The energy $E$ turns out to be 0 always. So, why does this equation hold?