How is the light emitted by an atom related to its electron configuration?

I've been struggling to figure out how exactly to answer this. I believe it has something to do with the electrons becoming excited and changing orbitals, but that's all I've really got..