Why does high frequency have high energy? The electromagnetic spectrum's wavelengths all travel at the same speed, $c$. Also, the wavelength $\lambda$ and frequency $\nu$ are related by $c = \lambda \cdot \nu$. Since all moving particles here would have the same speed, why would higher frequencies have more energy?
 A: Planck's constant is a conversion factor which changes the units of energy from a classical basis (as joules, for example) to a quantum basis which has wavelength (and therefore frequency) in it: E = hc/(lambda).
Note that if we write the laws of physics in natural units then energy has units of 1/(seconds) or "per second", which also gives you the tie-in to frequency i.e., "cycles per second*.
A: Massless and massive particles (like photons and electrons respectively) have different dispersion relations, i.e., the relations between the particle momentum and its energy, $\epsilon(p)$. Thus, for electrons we have
$$
\epsilon(\mathbf{p})=\frac{\mathbf{p}^2}{2m}
$$
whereas for photons
$$
\epsilon(\mathbf{p})=c|\mathbf{p}|
$$
The velocity is then defined as the derivative of the dispersion relation in respect to the momentum (in E&M momentum and velocity are usually referred to as phase velocity and group velocity):
$$
\mathbf{v}(p)=\nabla\cdot\epsilon(\mathbf{p})
$$
We thus obtain $\mathbf{v}=\mathbf{p}/m$ for electrons and $\mathbf{v}=c\frac{\mathbf{p}}{|\mathbf{p}|}$ for photons (with magnitude $c$.)
A: The relation just means that the wave can be decomposed (very roughly said) into quanta that have certain energy. For higher frequency waves the individual quanta have bigger energy than for the lower frequency waves.  That is an experimental fact - many phenomena can only be explained by this. But the wave itself may contain almost an arbitrary amount of energy (provided it is much more than the energy of the individual quantum). It would just be decomposed into fewer or more quanta.

Since the light is completely relativistic and massless, it is better to not think about the speed of the particle when arguing about the energy. The correct relativistic energy-momentum relation is
$$
E^2 = (pc)^2 + (mc^2)^2,
$$
and since the light quanta are massless, the energy is just $E=pc$. The momentum is universally related to the wavenumber ($k=2 \pi /\lambda$) by $p=\hbar k$. This also holds for massive particles according to the  the de-Broglie hypothesis. This relation is central to the wave-partical duality in quantum mechanics. The energy of a massless particle is then $E = \hbar k c = h \nu$.
All this does not explain why nature works like that, that must be showed by experiment. It just connects the experimental facts using some theory.
A: I want to give an intuitive explanation, but I have to start with several points that others have made.
First, any intuitive explanation is just suggestive. Ultimately, experiment is the final arbiter.
Second, this is really about energy per photon, not energy per time. So the fact that waving an electron faster takes more energy for the same period of time isn't the whole story.
Third, and this gets back to experiment being the arbiter, I have no intuition to give you on why light comes in packets with a specific energy depending on frequency. That was a big surprise and is connected to the other strange properties of quantum mechanics.
But, if you accept that light does come in photons with energy depending on frequency, then imagine what it would be like if lower frequency photons had the higher energy. If you wiggled a charged object very slowly, then you couldn't produce a single photon for a long time because you wouldn't have put in enough energy. That would mean no transmission, so a sensor at some distance wouldn't be able to detect the oscillation. But what if you moved it back and forth far enough so that another charged object ought to be pulled in visibly different directions? The change in direction of the electric field is an electromagnetic wave, and there's lots of evidence that you can have very low-energy low-frequency waves. This is a handwaving reference to the "classical limit" - if you do experiments at ordinary sizes and speeds, you need to get the results that classical physics says.
A: This was a big surprise when it was discovered. The answer is that when we construct models they agree with experiment if we assume the Planck relation. The phenomena (black body radiation, photoelectric effect, ...) demand it. That's how physics works: the phenomena are in charge.
A: The individual photons have more energy, but this does not mean the total energy in the wave has a higher energy. There are many examples of a high frequency, but a lower amplitude.
A: Energy and momentum obey the Einstein relation $E^2-|\vec{p}|^2=m^2$, $m$ is mass and I have set $c=1$. In spacetime diagrams, the energy-momentum four-vector $(E, \vec{p}) $ is aligned with the direction of movement of the particle.
For massive particles, if you increase the momentum $\vec{p}$, the four vector $(E,\vec{p})=(\sqrt{p^2+m^2}, \vec{p})$ becomes steeper and steeper. The slope of the trajectory of the particle increases. An increase in momentum corresponds to an increase in speed, and vice-versa
For massless particles,  the energy-momentum relation is simply $E=p$. So, regardless of the momentum of the particle, the slope of its trajectory is always $\frac{E}{p}=1$. The slope of the trajectory, i. e. the speed, is not correlated with momentum or energy
So, you should not try to draw inferences about the momentum or energy of massless particles from their speed.
Then, how do we define the momentum or energy of massless particles if not in terms of their speeds?
Classiclally, light is a field whose equations of motion are Maxwell's equations. The solutions of Maxwell's equations can be expanded as:
$$\sum_r \int \frac{1}{\sqrt{2\omega_p}}( a_r (\vec{k}) \epsilon_r ^{\mu}(\vec{k}) e^{-ikx}+ 
 a^*_r (\vec{k}) \epsilon_r ^{\mu}(\vec{k})e^{ikx})d^3p $$
Turns out, Maxwell's equations mathematicaly describe a system of an infinite number of Harmonic oscillators.
So, the total energy of the field is the just the total energy of the oscillators:
$$\sum_r\int \omega _{k} a_r^*(\vec{k}) a_r (\vec{k}) d^3k$$
Corresponding to each $(\vec{k}, r) $, $\vec{k}\in R^3$ and $r=1,2$, there is an oscillator. The mode variables $a$ and $a^*$ determine the initial condition of each oscillator. $\omega_k$ is the frequency of the oscillator. You can see that, assuming the mode variables have a fixed value, the energy of the oscillator increases with frequency.
This has nothing to do with Quantum Mechanics or Photons. The energy of a classical electromagnetic wave increases with increasing frequency, assuming the mode variable has a fixed value.
Coming to photons, they are definite-energy states (eigenstates) of the Quantum Electromagnetic field.
The relation between the frequency and the energy of an energy eigenstate is a consequence of the Schrodinger equation:
$$i\hbar \frac{d}{dt} |E\rangle =E|E\rangle$$
This is a general feauture of quantum theories. It relates the frequency, i. e. the time derivative of the wavefunction, to the energy.
A: This is not necessarily a good answer, but it might reduce the uneasiness with how energy of light changes with its frequency by showing that we do not have many choices anyway.
For a massive particle, speed $v$ and mass $m$ are parameters, so you can expect a function of them for energy in general grounds: $E=E(m,v)$.
For a massless particle, $m=0$ and $v=c$, so energy clearly should depend on something else. It is hard to guess what that would be for a massless particle, but we can do the next best thing and focus on radiation instead, which has four experimental parameters: intensity $I$, polarization $\epsilon$, phase $p$, and frequency $f$. The observed polarization $\epsilon$ and phase $p$ depend on the relative orientation and location of the observer, so we discard them: this leaves us with the relation $E=E(I,f)$ for radiation.
When we go from the field radiation to the massless particle photon, we can assume that energy is additive: this is not strictly speaking correct as $$E(n\text{ photons})=nE(\text{one photon})+E(\text{interaction between photons})$$
but clasically electromagnetic field does not self-interact, and we can suppress quantum effects. Therefore, the fact that $E=(I,f)$ for the field and the fact that "the intensity of the light is linearly proportional to the number of photons" lead to the conclusion $$E=E(f)\quad\text{for individual photons}$$
As the frequency goes to zero, the field becomes static: no energy is propagating, hence $E\rightarrow 0$ as $f\rightarrow 0$. Therefore, we can Taylor expand $E(f)$ at $f=0$: $$E(f)=c_1f+c_2f^2+c_3f^3+\cdots$$ Clearly, $c_i$ are universal constants, and the dimensional analysis dictates $[c_i]=\text{kg m}^2\text{s}^{i-2}$. Historically, Planck proposed a value for $c_1$ (and dropped all other $c_i$), which matched the experiments rather well; today, we denote it as a universal constant $h$ and call it Planck's constant. To my knowledge, we do not have any experimental motivation to come up with any other universal constant with the appropriate dimensions to change the above formula with nonzero $c_i$, so we are left with the conclusion that energy of the massless particles linearly change with their frequency.
