With a twilight sensor, the lighting can be automatically switched on and off according to the current light conditions: When it gets dark in the evening, the light turns on automatically. When it gets lighter again in the morning, the light turns off automatically.
Twilight sensors are usually installed in smart twilight switches or smart plug adapters.