Combining data from the recently launched Fermi satellite with TeV observations of atmospheric Cherenkov telescopes and low-energy observations has improved our understanding of the sources of high-energy radiation as well as of the conditions in the intergalactic space. After a review of the basic principles of propagation and detection of high-energy photons, I will discuss three applications: First, I examine for the example of the nearest radio galaxy, Cen A, how electromagnetic cascades shape the observed gamma spectrum and how they inform us about the conditions in the source. Second, I show that the non-observation of some TeV blazars in the GeV range by the Fermi satellite leads to the first lower limit on the intergalactic magnetic field (IGMF). Moreover, the IGMF has to fill more than ~50% of the Universe, strongly constraining possible generation mechanisms. Finally, I discuss how the observation of a diffuse extragalactic photon background in the GeV-TeV range can be used to constrain the flux of high energy neutrinos, providing important information for the choice of future neutrino experiments.