The most extreme high-energy transient events, such as gamma-ray bursts or fast radio bursts, can be seen out to cosmological distances. This enables them to serve as powerful probes of both cosmology and fundamental physics. A prime example is testing Lorentz invariance, which is a fundamental prediction of Einstein’s theory of relativity. High-energy photons from cosmological gamma-ray bursts can test for possible violations of Lorentz invariance. In particular, they can test for a possible energy dependence of the speed of light, through a direct time of flight measurement of the arrival time of photons of different energies from the same source. An exciting application to cosmology is the use of fast radio bursts, for which the column of ionised electrons between the source and us can be measured, to study the ionization history of the Universe and the amount of baryonic matter within it. Other examples of cosmological applications are: (i) measuring the cosmological infrared background radiation through its attenuation of high-energy photons from cosmological sources, or (ii) “pair halos” that can measure the inter-galactic magnetic field strength through its bending of the trajectories of electron-positron pairs that form through the process in point (i) and thus cause a delay in the arrival time of GeV photons that arise from the pairs’ upscattering of cosmological microwave background photons.