Typically the black power source wire will tap to the black at the photocell, the whites taps together, and the red taps to the power conductor back to the light. One method to help keep things straight is to get some red phase tape and put an identifying band of red tape on the ends of the power conductor (switched leg) to the light.