whenever anything is accelerating a force is affecting it, one of these forces is electromagnetism and a photon is theoretically what mediates it