In most religions light represents spiritual goodness. The absence of light or the dying of light or the interruption of light can be a religious metaphor for loss of goodness and presence of evil.
Also there are some paranormal reports of lights that blow out in the presence of certain people. So the flickering lights combine those paranormal reports (recall the “poltergeist” activity associated with the infestation/obsession stage of Regan’s possession, as well as the shaking and levitation of the bed) with the religious symbolism of the absence of light.