Start by reading Article 680 of the NEC.
NFPA 70: National Electrical CodeŽ
There may be local codes, changes, or waivers to the national code.
No permit needed in your area?
The NEC will tell you to connect, with a min of # 8 solid copper, NEC says bare or insulated, many local codes require all bare, to all metal within five feet of the waters edge, to include metal walls of pool, usually four corners is allowed. Some locals want each panel. Continue onto ladders, diving boards, any reinforcing mesh in concrete slabs, and mesh is required if poured or pavers are in this area. Continue onto any light fixtures in the pool walls, fencing, etc. This #8 ends at the exposed lug on the pool pump motor.
Be sure to read the code to determine if I missed something unique to your situation.
Grounding a pool is very detailed, and while most are typical, each is a bit unique.
This advice does not take the place of a professional installation and inspection.