What range of temperatures can an x-ray distinguish when studying celestial bodies?
1.5 - 150 keV
10 - 150 keV (non-thermal)
If the spectrum has the shape of a "blackbody", we know the X-rays are being produced by a region of opaque gas, and the peak of the spectrum tells us the temperature.
Anything hot emits radiation with a characteristic spectrum. This "blackbody spectrum" has a fixed shape, with the location of its peak determined by the temperature. At around 800°C. the peak is at the energy of red light, which is why the heater element in your oven glows red. At higher temperatures, the peak moves through the visible to blue, ultraviolet, and finally to X-rays.