I think what you mean is baked lighting aka cellular automata.
There are countless papers on this but the basic technique is creating a height map which is useful for a ton of reasons, namely what the sun can light and where to plant vegetation or not, and using cellular automata for things like torches and lava and caves aka light propagation.
For every air block that is above the height map give it full light, else reduce the light in a cellular automata fashion. Taking block densities into account and such. that way caves go dark as they become deep. And so on. It is a wonderful technique.