Why is the electromagnetic spectrum important?
It is important because it furnishes information about the composition, the temperature and maybe the mass or relative velocity of the body that emits or absorbs it.
An electromagnetic spectrum contains a series of different radiations that are emitted (emission spectrum) or absorbed (absorption spectrum) by a body and are characterized by frequencies and intensities.
Depending on the composition and temperature of the body, the spectrum can be formed by a continuum, by discrete zones of a continuums (bands) or by a number of sharp lines like a bar code. This latter is the most rich of information.