You could control the light with a switch, home automation, whatever. My light is controlled by my Jandy Aqualink. Power runs from the sub panel to the GFCI line in through the GFCI load side to a relay in my Jandy Aqualink box. From the load side of the relay it travels through conduit all of one foot to a junction box where it is spliced to the two cords running to the lights. That's one way to do it. Instead of the Jandy box you could have a simple light switch or some other home automation switch or relay.
A pool light (other than low voltage) must have a cord that runs to a listed junction box installed no less than 4 feet from the pool and 8 inches above the ground and 8 inches above the water. The number of grounding lugs must exceed the number of connections in the junction box. The cable must be terminated in the junction box and run through conduit to panel. The circuit (or at least the light) must be protected by a GFCI.
Look at NEC 680.23 and 680.24
This PDF Document explains it well: www.mikeholt.com/download.php?file=PDF/08_Article_680_Pools_and_Similar_Installations_PART_1.pdf
A pool light (other than low voltage) must have a cord that runs to a listed junction box installed no less than 4 feet from the pool and 8 inches above the ground and 8 inches above the water. The number of grounding lugs must exceed the number of connections in the junction box. The cable must be terminated in the junction box and run through conduit to panel. The circuit (or at least the light) must be protected by a GFCI.
Look at NEC 680.23 and 680.24
This PDF Document explains it well: www.mikeholt.com/download.php?file=PDF/08_Article_680_Pools_and_Similar_Installations_PART_1.pdf