The modern way of describing photons is through the quantization of the free electromagnetic field. The relations ##E=\hbar \omega## and ##\vec{p}=\hbar \vec{k}## follow from the decomposition of the electromagnetic field in momentum eigenmodes you also get the energy-momentum relation from the dispersion relation of electromagnetic waves, i.e., ##\omega = c |\vec{k}|##. Multiplying by ##\hbar## leads to ##E=c |\vec{p}|##, i.e., in momentum space the photon energy-momentum relation is that of a massless particle.
You can read about this in any textbook on relativistic quantum field theory. Some good introductory ones are
T. Lancaster, S. J. Blundell, Quantum Field Theory for the Gifted Amateur, Oxford University Press (2014)
Schwartz, M. D.: Quantum field theory and the Standard Model, Cambridge University Press, 2014
but be warned. You need quite some knowledge about classical electrodynamics, special relativity, and non-relativistic quantum theory to understand relativistic QFT.