Over the last decade, several multi-wavelength studies have demonstrated the existence of tight correlations between the collective number and luminosity of bright X-ray binaries, as well as the hot interstellar medium (ISM), and the star formation activity of the late-type host galaxies.These properties are valid both in the local Universe and at intermediate redshifts, making X-ray observations a powerful tool to estimate the star formation rate in distant galaxies. Recent results show that the multiple-galaxy-wide average relations for bright X-ray binaries also hold on small, sub-galactic, scales. On much larger scales, X-rays from star-forming galaxies in the early Universe (z > 15) regulate the thermal history of the intergalactic medium (IGM) and leave an imprint on the 21 cm signal, determining its amplitude. The IGM temperature fluctuations caused by soft X-rays from hot ISM are large compared with that due to X-ray binaries with harder spectra.