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

Capacitor

Comparator

Thermistor

Inductor