The ‘relativity with a preferred frame’, designed to reconcile the relativity principle with the existence of the cosmological preferred frame, incorporates the preferred frame at the level of special relativity (SR) while retaining the fundamental spacetime symmetry, which, in the standard SR, manifests itself as Lorentz invariance. In this paper, the processes, accompanying the propagation of cosmic rays and gamma rays through the background radiation from distant sources to Earth, are considered on the basis of particle dynamics and electromagnetic field dynamics developed within the framework of the ‘relativity with a preferred frame’. Applying the theory to the photopion-production and pair-production processes shows that the modified particle dynamics and electrodynamics lead to measurable signatures in the observed cosmic and gamma-ray spectra which can provide an interpretation of some puzzling features found in the observational data. Other processes responsible for gamma-ray attenuation are considered. It is found, in particular, that electromagnetic cascades, developing on cosmic microwave background and extragalactic background light, may be reduced or suppressed due to the preferred frame effects which should influence the shape of the very high-energy gamma-ray spectra. Other possible observational consequences of the theory, such as the birefringence of light propagating in vacuo and dispersion, are discussed.