Why are the thickness (or brightness) of spectral lines different?

Something to do with the number of photons?