One of the biggest hazards in a pool is the pool light. Prior to 1970, pools were built with the junction box of the pool light in the deck right next to the pool. Deck mounted pool light junction boxes are extremely dangerous, leading to many deaths across the country each year. Deck mounted junction boxes can fill up with water and when the light is powered on, it electrifies the water in the pool.
The Code now dictates all pool light junction boxes have to be at a minimum distance of 5 feet from the edge of the pool and 10 feet above the water (no chance of filling with water), as well as installing a GFCI protection device, thus eliminating all chances of electrifying the pool water.
If you have a deck mounted pool light junction box, this is a real hazard that should be corrected immediately.