I don't suggest you go at this on your own without experience, messing with mains voltage can literally be a killer... Get one of the properly designed over the counter commercial units and stay safe...
As I said Google "220 volt dusk to dawn switch" there is no reason for me to do it for you...