I'm not exactly sure what you are asking. There are specific lines that help a lot in determining the nature of the ionization of the surface layers-- indeed, the 3<-->2 transition in hydrogen (the "Balmer alpha" line) is one such line. That single line is largely responsible for the letter in the "spectral type" of a star, where letters near the beginning of the alphabet (A star, B star, etc.) mean the Balmer alpha line is very strong, and letters later on (M star, O star) mean the Balmer alpha line is virtually absent. To get a letter like A or B, you need a T that is about 10-20 thousand K, because then you get lots of excitation of level 2 but not so much that you completely ionize the hydrogen. Some later letters, like O, are because you got too hot and ionized everything, and other later latters, like M, are because you are too cold and cannot even excite hydrogen to the second level. That's what saddled us with "OBAFGKM" for the rest of astronomical eternity.
As for the internal layers, you are right that we don't see those-- we only see the surface layers. What's underneath just has to be modeled using the laws of physics and some helioseismological constraints, and it all works out well, to the point that neutrino oscillations were first indicated from solar interior models, not particle accelerator experiments. Under the surface, the density is so high that individual lines form a "line blanketed" continuum, so we just have essentially blackbody physics ruled by a kind of average opacity called the "Rosseland mean opacity," rather than particular absorption lines. But there's still a lot of opacity variation from frequency to frequency, and the radiative flux of the star tends to be carried in the wavelength regions where the opacity is lower.