How to animate a lightbulb going on and off
The principle is the following but can be more or less complex starting from the video as it will surely involve several drivers and to do it in material and compositing nodes settings.

Here the cube's color is changing depending on the position of an empty along Y (the effect is visible in rendering mode):



In this example, I add a driver to the 'fac' value of a mix shader:



Then open a view and set it to 'graph editor' (1), then set it to 'drivers' mode (2), select your object (the lamp in your case), then its material and the 'fac'. Then (4), open the right panel (N) and choose the 'drivers' tab:



Add for instance an empty. Then in the driver panel, use it as input (variable) object (1), and for example choose its Y position to drive the result. Set (2) the driver to 'scripted expression' then set the expression to (var > 0) so that the output is 1 when the empty.Y is above 0, and is 0 when it is below 0.



Doing that, the mix shader node is driven by this previous driver's output. So you can animate a lamp this way, just moving an empty.