The spectral energy density of blackbody radiation, plotted against photon energy $E$ in eV. Because $E = hc/\lambda$, the wavenumber $1/\lambda$ (in nm−1) is just this same energy axis rescaled by the constant $hc \approx 1239.84\ \mathrm{eV\cdot nm}$ — both units are shown together on the top and bottom axes, with no distortion, since energy and wavenumber are both linear in frequency.
Spectral energy density per unit photon energy (Schroeder's blackbody formula, rewritten with $E=hf$). Its peak sits at $E_\mathrm{peak} = 2.8214\,k_BT$, and the total energy density integrates to the Stefan–Boltzmann result $u_\mathrm{tot} = aT^4$, $a = 4\sigma/c$.
The "Sun peaks at ~500 nm (green light)" fact is about a different function: the wavelength distribution $u(\lambda)$, whose own peak follows $\lambda_\max T \approx 2.898\ \mathrm{mm\cdot K}$.
$u(E)$ and $u(\lambda)$ are related by a nonlinear change of variables ($d\lambda = -(hc/E^2)\,dE$), which reshapes the curve and shifts its maximum. This sim plots $u(E)$ (equivalently $u(1/\lambda)$, since both are linear in frequency), so its peak instead follows the frequency-space constant $E_\mathrm{peak}=2.8214\,k_BT$ — landing at 1.405 eV ≈ 882 nm for the Sun's 5778 K, not 502 nm.
Both are correct — they answer different questions ("which wavelength interval carries the most power" vs. "which energy interval carries the most power"). This is exactly why a blackbody's "peak color" needs to say which spectral variable it means.
Which one a real instrument reports depends on how it bins the light: a grating spectrometer's pixels sit at roughly fixed $\Delta\lambda$, so it naturally measures $u(\lambda)$ — the source of the "502 nm" figure. An FTIR spectrometer instead comes out of its Fourier transform in wavenumber ($1/\lambda$, usually cm−1) — the same variable as this sim's top axis. A radio receiver is channelized in Hz ($u(\nu)$), and an energy-dispersive X-ray detector sorts photons by energy directly ($u(E)$, this sim's plot). There's also a second, independent choice stacked on top: a bolometer responds to deposited energy, while a photon-counting detector like a CCD gives one click per photon regardless of its energy — i.e. photon-number density, not energy density — which shifts the peak yet again.