Most likely the red is the "switch" leg and should be attached to the light along with the attaching the whites to each other. The black is probably hot all the time, and is the one that you should attach to the pool light if you want to operate the light with the pull chain.