BNSF here in Amarillo stops the yard activity and gets all the Switchmen and Carmen to the building in advance of a thunderstorm that is expected to hit and produce lightening. After the storm has passed, work resumes. On the road, weather warnings are issued and employees govern themselves accordingly.
BNSF subscribes to Weather Data which monitors the territory served by the railroad and issues warnings to the Network Operations Centers where it is disseminated to the field.
In the 20th century, you were expected to use common sense and not make yourself a target for lightening. Being on the ground in a lightening storm with large steel equipment near you is dangerous.