Automatic function of street light can be done by the use of:

Thermistor

Comparator

Capacitor

Inductor