In a thunderstorm, there is no safe place outside. Finding shelter quickly is critical. The sound of thunder often precedes a storm by only a few miles, and fast-moving storms can give you little time to find shelter. But it's better to take cover long before you hear the first rumbles of thunder.
It's close to impossible to go camping and not experience some bad weather at some point, no matter how much you plan. Dealing with severe weather and lightning when camping, particularly if it catches you off-guard, is all about understanding the risk of what you're dealing with.