You can identify an unknown substance by measuring its density and comparing your result to a list of known densities. Density = mass/volume. Assume that you have to identify an unknown metal. You can determine the mass of the metal on a scale.
The lights shown in the figure comes from the outermost layer of the Sun. This layer is called photosphere. This is the layer from where the light of the Sun is radiated, before travelling through space and reaching us.