Courtesy links: If photons have no mass, how can they have momentum? How is it possible photons have no mass but have energy?
I saw two other questions asked about why photons have momentum and energy even though they do not have a rest mass. I now wanted to ask about Planck's constant. An object's action has dimensions of $M L^2 T^{-1}$. I do not see this being followed by photons. A constant action of $6.6 \cdot 10^{-31} \text{g} \, \text{m}^2 \text{s}^{-1}$, called Planck's constant $h$ has some connection with photons. The energy of photons is $E = h f$, where $f$ is the frequency of the photons. Where does this constant come from?