Think of the "L" terminal on the regulator as a switch, controlled by the charging state. If the regulator is charging the battery then the switch is open (no current flows through the lamp), and if the regulator is not charging the battery then the switch is closed (turning on the lamp).