  Uncertainty relation for photons that overcomes the difficulties caused by
the nonexistence of the photon position operator is derived in quantum
electrodynamics. The photon energy density plays the role of the probability
density in configuration space. It is shown that the measure of the spatial
extension based on the energy distribution in space combined with a measure of
the spread in the photon momentum leads to an inequality that is a natural
counterpart of the standard Heisenberg relation. Unexpectedly, the equation
satisfied by the photon wave function in momentum space which saturates the
uncertainty relations has the form of the Schr\"odinger equation in coordinate
space in the presence of electric and magnetic charges.
