Only fish very close to where lightning hits the water are in danger because lightning dissipates, according to the Economic Times. Lightning generally dissipates within tens of meters from where the charge originally hits the water. Any fish further than that distance may feel a tingle but nothing more.
Lightning is created when an electrically charged cloud creates a channel of ionized air below it. The channel is known as a leader. This leader grows downwards as an oppositely charged leader grows from the bottom. When they meet, a huge current flows from the clouds to the ground. Saltwater is a very good conductor, and good conductors keep most of the current on the surface. This means that the lightning does not travel very deep underwater. Most fish are deep under the surface, so they are not in any danger during thunderstorms. On the other hand, people tend to swim near the surface because they need to come up for air, so people should not swim during a thunderstorm.