a lot better...we can excite these atoms in a lab and simply measure what comes out. often times don't even need a model because spectroscopy can be fully empirical for many transitions
Spectroscopy is a very straight-forward and mature technique. Saying that “we see these spectral lines in this picture so there must be oxygen” is not considered any more controversial than “we see a bright dot in this picture so there must be a star”.