It's basic properties of propagation of light and sound.
In practice, the duration of thunder from a given lightning bolt might be affected by echos and other phenomena, though you could probably get at least a rough estimate of bolt length by the duration of thunder.
The largest lightning bolts ever measured are hundreds of kilometers long. The longest I'm aware of was over 760 km long (477 mi), measured in February of this year:
That probably roared for a while, though attentuation of sound would likely occur within 16--32 km (10--20 mi), or a minute or two. Otherwise, it would take nearly 40 minutes for sound to propagate from one end of the strike to the other.
In practice, the duration of thunder from a given lightning bolt might be affected by echos and other phenomena, though you could probably get at least a rough estimate of bolt length by the duration of thunder.
The largest lightning bolts ever measured are hundreds of kilometers long. The longest I'm aware of was over 760 km long (477 mi), measured in February of this year:
<https://www.noaa.gov/stories/worlds-longest-lightning-flash-...>
That probably roared for a while, though attentuation of sound would likely occur within 16--32 km (10--20 mi), or a minute or two. Otherwise, it would take nearly 40 minutes for sound to propagate from one end of the strike to the other.