A listener asked “Can a bolt of lightning come out of a clear sky?” The answer is yes. The phrase “bolt from the blue” is often used to indicate a surprise, as “a bolt of lightning from a blue sky”. According to Phrase finder, a reference for quotations, the earliest citation is Carlyle, 1837 - "Arrestment, sudden really as a bolt out of the Blue, has hit strange victims." Sadly, that is still true. Lightning can travel more than 25 miles from the thunderstorm itself. There have been numerous cases of victims being struck by lightning from a clear sky. That is why it is important to take cover when thunderstorms are in the vicinity – even if the rain has yet to arrive. It is also recommended to wait about 30 minutes after the storm has passed to resume outdoor activities.
Mary Knapp, Weather Data Library