In a motor vehicle comprising headlights, an ignition switch, and an electric energy storage battery, there is provided a device for automatically turning on and off the headlights. A first and a second comparators responsive to two different reference voltages and to the voltage V present between the terminals of the battery determine whether the voltage V has an amplitude located within a predetermined range of voltage amplitudes. An electronic switch interposed between the battery and the headlights is controlled by the outputs of the first and second comparators to turn the headlights on when the amplitude of the voltage V is located within the predetermined range, and to turn the headlights off when the voltage V is outside of this range. The device is connected to the battery so that it operates only when the ignition switch is closed. The device is also connected in parallel with the normal, manually operated lighting switch so as to allow normal operation of the headlights through the latter switch.