While the details of the particular edit likely vary, that effect is achieved by using key-frames to manipulate color levels during the sequence. In my case I used FCP's built in arsenal of various color filters, and whether FCP or Premiere, After Effects, or any other program, the basics will be the same; using key-frames to manipulate how saturated colors are/pushing the values closer and closer to black, thereby creating the illusion of the lights flickering or going out. If you want smooth, pulsating shifts you use the key-frames differently than if you want it to appear as flickering or on/off type changes, but either way key-frames and filters are what allow you to manipulate the visuals.
If you've not used key-frames before you should be able to consult the legion of 16 year olds who fill Youtube with tutorials. Of course, if you do some digging and trials and come up with specific questions after trying, I'm sure myself or someone else here may be able to provide some additional guidance.