Why it stops racing
A race track is open ground full of people, with metal grandstands, fences and tall light poles. The National Weather Service is plain about it: no place outside is safe when a thunderstorm is in the area, and lightning can strike miles from the storm that makes it, before the rain arrives and after it has passed.
The 30-minute rule
Many tracks and series stop the cars and clear the stands when lightning is within about eight to ten miles, and wait until 30 minutes have passed without a strike before starting again. Each new strike restarts the clock, so a slow storm can mean a delay of an hour or more even if it barely rains at the track.
How the forecast sees it
The track page shows "Lightning possible", and the flag for that hour turns red, when the forecast has a thunderstorm in the hour, or when the atmosphere has the energy for storms (CAPE of 1,000 J/kg or more) together with a 30% or higher chance of rain.
A National Weather Service severe thunderstorm or tornado warning for the track makes the flag red; a watch makes it at least yellow. Summer storms are short-lived and hard to place more than a few hours out, so on a stormy day the radar loop on the track page is the better guide.
If you are at the track
Follow the track's announcements and go when they say. The safe places are a hard-topped vehicle with the windows up or a substantial enclosed building. A tent, a canopy, an open shelter, the bleachers and the space under a tree are not.
Questions
How long is a lightning delay?
At least 30 minutes after the last strike nearby. A slow-moving storm can stretch it to hours.
Is my car safe in lightning?
A hard-topped metal vehicle with the windows up is one of the safe places, according to the National Weather Service. A convertible or an open vehicle is not.
What is CAPE?
Convective available potential energy: how much energy a rising pocket of air could get from the atmosphere. The higher it is, the stronger the storms if something sets them off.
Why is the flag red when the chance of rain is low?
Because lightning is possible: storm energy in the atmosphere with a chance of rain of 30% or more is enough, and a storm a few miles away can stop racing without a drop falling at the track.