Yes it can be. I once read in the British yachting magazine “Practical Boat Owner” that, if the lightning is to strike within a radius roughly equal to that of the mast height, it will hit the mast, else, the sea. read more
The three most common ways water vessels are affected by lightning are direct strike, close proximity of a strike and, if docked, through the shore power. Like all electricity, lightning seeks any and all paths of least resistance to ground. read more
Modern ships are equipped with lightening arresting systems that provide the lightening a safe path to follow to the sea. The worst case could be if anyone is out on deck they could be injured or worse if they are unlucky enough to be near where the lightening strikes the ship. read more