Why does my photo sensor activate during the day?
Old photocells do age.  Sort of by convention, they are often designed to fail "on". For instance most street lights and discharge loghts use $15 replaceable hockey puck photocells, designed to fail "on" so city staff can distinguish a failed sensor from a failed bulb, and go up in the boom lift with the right part.  The manufacturer will happily sell you a special model designed to fail "off", if you really want that.    

New photocells have a different "problem".  They have a microcomputer and a clock, and are able to observe light levels over 24 hours and "learn" what night and day look like.   This makes them resistant to shadowy locations or slow accumulation of dirt.  However they also need 24-48 hours to get acclimated, and if you cut power to them, they may forget and have to learn all over again.  

That last bit is important because some people like to put their photocell lights on a switch or mechanical timer too... their modern sensor will never perform right for them.

The transformer is probably solid, the sensor not so much.  You also have to watch voltages, you need a different sensor on the 120/230V versus the 12/24V side.  You may be better off bypassing the sensor on the transformer, then using a modern photo sensor upstream to switch the entire system on and off.