i think learning about spectroscopy this semester broke me a little. visible light is just electromagnetic radiation and astronomers will get what youre saying if you call anything on the em spectrum light. whats em radiation? well its waves. of what? energy! okay so light is just energy, kind of. but also light behaves like particles because it is also a bunch of photons, actually. what? wave-particle duality dont think about it too hard. ok now think about an atom. the electrons move on these things called orbitals. if an electron gets hit with a specific amount of energy (which is light. which is best described as photons in this scenario) it can move up an orbital, but it has to be that specific amount of energy, no more and no less, otherwise the energy (light) (photons) just passes through. fucked up, right? and the electrons want to go back to their resting orbitals so they have to give off this energy (photons) (light) (em radiation). anymore questions on this should be directed to someone who understands quantum physics.
ok and the atomic structure of elements is different for each element right. so the light electrons give off/absorb will be unique to each element. so elements each have a unique light signature called emission or absorption spectrum. so you can find out what something is made of based purely on the kind of light it produces.
but remember! light (energy) (em radiation) is waves. if it was one stationary object sending light to another stationary object then the wavelength wouldn't change. but. everything in space is moving. and space itself is expanding. which means the wavelengths get longer when traveling to us (usually) because its moving away. so everythings shifted to the red. why red? red has longer wavelengths. why? because we gave a name to the lower frequency wavelengths we can perceive and we called it red. theres no actual way of proving that we perceive these wavelengths the same, just that we called them the same. dont worry about it. we also CANT perceive the "reddest" wavelengths so they aren't really true red in the way visible red is, but we call it red
anyway because of the expansion of space and the physics of how light travels, as the universe itself gets bigger, the observable universe gets smaller.
oh yeah and theres matter that doesnt interact with light in any way. btw. and its most of the shit in space