This piece for Links Beat collects the advice that holds up in practice.
Thunderstorms often build quickly in the afternoon, especially in mountains during summer. Check the forecast before setting out and plan to reach exposed ridges and summits early in the day. If you hear thunder, lightning is close enough to strike, so it is time to move towards lower ground and shelter. No place outdoors is completely safe during a storm.