Light turning on and off
You can use the Noise Modifier: just increase a lot the strenght of the noise and the add a Limits Modifier, to clip the values between 0 and your maximum desired value



This is the quick and easy way. If you want more control you could use nodes (I am thinking of a noise modifier applied to the value of the strenght of the an Emission shader, using Greater Than and Less Than nodes), but you would need to use a mesh instead of a light object