This is a fundamental property of photons, as they are the fundamental particles that mediate the electromagnetic force. The electromagnetic force is responsible for interactions between charged particles, and since photons themselves are not charged, they do not participate in these interactions.
Therefore, the magnitude of the charge on a photon is zero.