The diagram shows a transistor used in a circuit. The transistor in the circuit is used to

The (NPN) transistor in this circuit is used to switch a current. When it switches current ON ... acting like a closed switch ... the light goes on.
It's kind of mystifying WHY all of this technological complexity is necessary. There's already a switch in the circuit ... (the two little circles above the 1K resistor in the base circuit with the tilted line between them). That switch could just as well be used, in place of the transistor, to directly switch the current through the light. Why use one switch to control a transistor to make it behave like another switch ? ?
The only actual necessity for doing this that makes sense is if the switch in the base circuit is a tiny low-power switch, and the transistor is a big moose high-power transistor, controlling a high-current, multi-kilowatt searchlight.
A place you might actually find an application like this would be in your car. A small current through the ignition switch behind the key is used to turn on a high-power transistor under the hood, which controls the huge current to the starter motor. That way, they avoid running a 100-Ampere cable in and out of the ignition switch, and needing a several-hundred-Ampere switch in the steering column behind the key.