I'm glad that you have asked this question, it shows a serious concern to prevent injury.
there are several reasons why the water can become energized! Too many to cover in a single reply. MIT and others have studied this in detail. the main issue is "step potential", the salts in the water are conductive. If a source of power is in contact with the water, and it doesn't matter where it is coming from (house, utility, primary, secondary, generator ,etc, what ever the source is) you need to reduce the difference of potential between the water and the surrounding area's . if someone is in the water and there is a difference in potential, within the reach of that person , between the water and the deck, wall, house, etc, It will have the possibility to shock them.