Another way to find the energy diffusion time in the Sun? I was surprised when I first heard that the energy produced at the Sun's core takes a long time to escape the Sun.  The process is often explained as a photon traveling a "drunkard's walk" based on the mean free path within the layers of the Sun.
One such NASA estimate is linked here.  It mentions estimates ranging from 4,000 years to several million years.
It occurred to me that maybe the diffusion time could better be estimated by dividing the total thermal energy of the Sun by the power output of the Sun. One estimate of the thermal energy of the Sun is 3.09 x 10^41 J given in the accepted answer of this question. On Wikipedia, I found that the Sun's luminosity is 3.828 x 10^26 W.
Dividing, we get a time of 8.07 x 10^14 seconds, or about 26 million years.  I guess this is how long it would take the Sun to cool completely if it stopped producing energy, but kept radiating at its current rate.
Does my calculation make sense?  26 million years is above the usual estimates of energy diffusion times.
EDIT BELOW:
I want to explain why I thought that the simple division of thermal energy by luminosity would give a reasonable estimate of the energy diffusion time.
Assume that each bit of energy produced in the Sun's core travels radially outward at a steady pace until reaching the surface.  I think it's clear that, given the inputs above, each bit of energy would require 26 million years to escape.
Now, due to the "random walk" nature of the diffusion process, each bit of energy will take a random amount of time to escape.  My thinking is that the average escape time would still have to be 26 million years to maintain the Sun's (fairly constant) thermal energy and luminosity.
 A: How long it takes the sun to radiate X amount of power is only a quantification of the radiated power in different units of X/s instead of joules/sec. 
In this case, in units of the the approximate suns thermal energy per second.
Imagine the core is very small so the thermal energy you consider is then much smaller. Consequently the time you will estimate will be much smaller. But a smaller core should mean a longer journey to the surface. 
This case reveals that your equation takes no account of the journey through the extent of the body beyond its small core.
A: I believe your calculation makes sense.
Michael Stix's 2003 article "On the Time Scale of Energy Transport in the Sun" states that "the time scale of energy transport in the Sun is the Kelvin–Helmholtz time scale, of order $3 \times 10^7$ years, roughly 100 times longer than the photon-diffusion time estimated by Mitalas and Sills (1992). The difference corresponds to a factor $U_{gas}/U_{rad}$, the ratio of thermal energy density to radiation energy density. Thus the heat transport, even when mediated by photons, is slowed down by the large heat capacity of the star."
Your value of $2.6\times 10^7$ years also happens to be the precise value calculated for "energy residence time in the Sun" in a 2019 ArXiV article "Residence time of energy in Earth's atmosphere and in the Sun" by Carlos Osácar, Manuel Membrado, and Amalio Fernández-Pacheco.  A revised version was later published as "Residence time of energy in the atmosphere", but without this precise value.
Spruit, in "Theory of Solar Irradiance Variations", emphasizes the difference between the thermal and diffusive timescales, and gives as an example the behaviour of a chunk of aluminium suspended in space and heated from the inside. The thermal time scale is how long the chunk takes to reach thermal equilibrium with with the heat radiated from the surface equal to the internal heating power. This depends on the total heat capacity of the chunk.  The diffusive time scale is how long it takes the temperature of different parts of the chunk to equilibrate, which depends on the thermal conductivity of the metal. This is much shorter than the thermal time scale because aluminium is such a good thermal conductor.
Similarly, the Sun's diffusive timescale is much shorter than its thermal timescale because of the very large turbulent diffusivity (effectively the "conductivity") in the Sun's convection zone.
As you know, the comments and discussion for the question "Sun Light takes 1,000/30,000/100,000/170,000/1,000,000 years bouncing around inside to then reach the Earth" are somewhat relevant.
A: An alternative to diffusion models is to make a estimate of the Virial relaxation time for some model of the sun.
I use a particularly spherical and bovine model in class sometimes (simple enough to be written up in a few pages and done at the board in under an hour), and it give numbers like 100,000 years for the time it would take the luminosity to drop by 1% in the event that fusion suddenly shut off in the core.
This should be taken with a significant degree of skepticism as the model involved is brain dead and was selected for it's tractability rather than for physical fidelity, but it is striking that the result falls in the middle of the range of results from diffusion model and because it predicts a mean temperature that is similarly reasonable (about $10^7\,\mathrm{K}$).
A: The random walk argument gives the timescale for a photon/radiation, $\tau_{\rm rad}$, to diffuse out of the star assuming it is absorbed and remitted immediately in random directions.
This is quite different to the thermal energy diffusion timescale, $\tau_{\rm therm}$ - the timescale for most of the thermal energy to diffuse out of a star.
That is because in most stars, a tiny minority of the thermal energy is held in the radiation field. Roughly speaking
$$\frac{\tau_{\rm therm}}{\tau_{\rm rad}} \sim \frac{\rm Thermal\ energy\ in\ the\ star}{\rm Thermal\ energy\ in\ the\ radiation}$$
A Sun-like star in which fusion is turned off will replenish the energy in its radiation field about a hundred times before it cools.
