Dave, do you recall which substances showed on the spectrograph? Didn't Hydrogen and Oxygen both show up in the results?
The emissions lines were consistent with H2O. The emission lines given off are specific to each substance, even isotopes of the same substance have slightly different emissions. Most of the reason for differences is the arrangement of electrons. Since the arrangement of electrons in H2O is different from the arrangement of hydrogen and oxygen, different emission lines will be given off. I hope I'm understanding your question correctly. I will consult the text book for more information.