Starting to fit in the pieces.
Just like a puzzle, bits of information can sometimes be assembled to "see" the whole picture.This is beginning to sound more like a nearby lightning discharge. I'll make a few gross assumptions and you can correct me where I'm wrong.Considering this happened during a storm, it's probably a safe bet to assume it was raining at the time. The wet hull would form a reasonable conducting path between the rub rail and water. Maybe your rub rail is even bonded to your boat ground.A nearby lightning discharge, especially in the vicinity of the transformer, could elevate the ground potential to thousands, even millions of volts. The transformer and neutral wire are bonded to earth ground. A lightning discharge could elevate the neutral to this potential. This voltage is "looking" to dissipate itself along any appropriate path.I am assuming your shore power cord was in good shape and not worn through where it touches the rub rail and dock. Many types of power cords have insulation rated for a maximum of 600 volts. Exceed this limit and the insulation can no longer contain the voltage on the conductor. It will arc out wherever it can find a suitable lower potential.The water your boat sits in represents a rather immense ground source of lower electrical potential. Beginning to get the picture? If the neutral was energized to lightning generated voltages, your boat's wet-hull-ground-path and the metal dock likely conducted some of that energy to the water. Hence I would expect to see arcing at both the rub rail and on the metal dock as these voltages far exceed the insulation rating of the shore power cord. So, to answer your question, I suspect the surge traveled from the shore power receptacle to your dock and boat as it made its way to ground (water).Should you be concerned? I would check all electronics to make sure they are okay. Look on the sides of the boat for any indication of arc-tracking (carbon deposits) from the rub rail to the water line. If you do not see any structural damage to the gel coat, breathe a sigh of relief and go sailing!Mark KisselKittiwake/98H240