A lamp is a pretty simple device.
Being a few components that make it up, we can do some of the practice with repairing some non-working lamp.
The bulb may seem trivial but sometimes it is not controlled. Check it by placing it in another lamp.
Then what else to check is that the jack to which the lamp is connected is working. We test the grip with a lamp of which we are sure the operation.
Often the malfunction is caused by the bulb holder , contact does not allow ignition. Often, with the passing of time, the bulb heat "bakes" the bulb plastic, so it will need to be replaced.
Other times is the cable of the lamp that always stops due to heat or some strike. Again, a replacement will be required.
The ignition switch may fail, to test the operation, we will need a tester and check that it opens and closes the circuit.