Metastable states are excited states of a quantum system that are not in the lowest energy configuration but remain stable for a significant amount of time before transitioning to a lower energy state. These states can play a crucial role in atomic spectra by allowing certain energy levels to persist longer than expected, which affects the emission and absorption of light.