In electrodynamics, light as a wave has an intensity $I = \frac{1}{2} c \epsilon E^2,$ where $E$ is the electric field amplitude.
Meanwhile in quantum mechanics, we study $I = \frac{dn}{dt} \frac{hc}{\lambda}$ where $\lambda$ is the wavelength and $\frac{dn}{dt}$ is the number of incident photons per unit time.
So at the same time, light carries both energies and these are different right?
My question arose from when an EM wave enters a medium from vacuum as a wave. Its wavelength stays the same while the particle's wavelegnth decreases.