Every type of atom in the universe has a unique fingerprint: It only absorbs or emits light at the particular energies that match the allowed orbits of its electrons. That fingerprint enables scientists to identify an atom wherever it is found. A hydrogen atom in outer space absorbs light at the same energies as one on Earth.
source https://www.lifetechnology.com/blogs/life-technology-news-blog/scientists-combine-light-and-matter-to-make-particles-with-new-behaviors