Automatic functioning of street lights can be done by the use of:

Rectifier

Inductor

Emf

Comparator