Maintain the same pipe size as the return pipe (usually 1-1/2″ or 2″) for the two lines to and from the solar panel location.

If the panels will be installed on the roof, plastic conduit pipe hangers will hold the pipe securely to walls and the eave. At the roof edge install a union fitting on each pipe to make it easy to remove the panels seasonally, or for wind, or to replace the roofing. Even for solar panels on the ground, union fittings will make seasonal removal easier. Consider burying the rigid pool pipes to keep your yard looking neat.