Lightning is random, unpredictable and very dangerous. The best protection against lightning is avoidance. Head into shore well ahead of the turbulence. Lightning can lash out for miles in front of a storm, and it can strike after a storm seems to have passed. These clouds can be VERY large, reaching several miles high and several miles in circumference.
Squall lines preceding cold fronts also produce thunderstorms.
Listen to NOAA weather reports for storm reports. These reports are available on your VHF radio, and also on some marine stereo systems. If you see lightning, you can determine the distance from you by timing how long it takes for you to hear the thunder. Every five seconds of time equals one mile of distance. If it takes 20 seconds to hear thunder after you see lighting, then the storm is four miles away.