With both the ignition and the car lights on, piezo transducer BZl draws no current and remains silent. With only the ignition on, diode Dl is reverse-biased and so prevents current flow through BZL. However, when the lights are on and the ignition is off, the transducer becomes energized and sounds to alert you to tum the lights off.
With the ignition off and the lights on, D2 is reverse-biased, preventing current from flowing to the ignition. Resistor Rl prevents a short circuit when the ignition is on.