should be connected to the 120 "hot", usually a black wire. The red wire of the photocell or "switched" should be connected to the black wire of your light fixture (load). The whites (neutrals) should all be connected together and the same goes for the grounds (greens, bares).
Hope this helps. Luck, Kizmet