They use physics based on observation. Also, they listen to the Sun and based on the sounds it makes they can figure what is actually occurring within. This is why they say 100k to 1m years, because sometimes torrents are created within the Sun's mass that can fire photons up from below. Those torrents are created by magnetic fields twisting and turning around the Sun. When those magnetic fields get so twisted they break loose and cause massive solar ejections (Solar Flares) When that happens, massive amounts of energy gets fired out from the Sun and some of those plumes come from deep within the Sun itself. (hence sometimes faster release of the photons in 100,000 years vs 1,000,000 years)