In-Universe
Anakin cut the lighting cable because it was in his way as he walked backwards. He had to step over it, and presumably felt that cutting it would clear the fighting area, removing a slightly random element. It's noteworthy that neither this scene, nor the "fighting in the dark sequence", exist in the original script and appear to have been added at the production stage.
With TWO LIGHTSABERS, ANAKIN attacks. COUNT DOOKU parries and
ripostes. It is no contest. ANAKIN is driven back against the wall. He
loses one lightsaber. Finally COUNT DOOKU, in one flashing move, sends
Anakin's arm, cut at the elbow, flying still gripping his lightsaber.
Out-of-Universe
This sequence was added for a few reasons, some more obvious than others.
To disguise digi-Lee.
Christoper Lee was an old man by this point and largely incapable of fighting with a sword, let alone spinning and whirling. They replaced him with a "digital Lee" in longer shots (replacing his face) and used close-ups of his face to make it look like he was fighting. Having lowered lighting makes it easier to 'sell' the effect to audiences as well as making the animation cheaper and hiding the 'uncanny valley' effect when you have digital characters on film.
Pablo Helman: As wonderful an actor as Christopher Lee is, when we shot this he was 79 years old and so the majority of these
moves he couldn't really quite do. For some of the shots we had his
stunt double do the action and then on top of that we replaced the
stunt double's face with Christopher Lee's face. In some other shots
we just replaced him completely.
Attack of the Clones: DVD Audio Commentary
To increase the excitement of audiences
Lucas also felt that lowering the lighting would ratchet up the tension rather than just having more of the same between Dooku and Anakin. Having already seen a fight in a well-lit hangar, the obvious progression is to do something with the lighting. The darkness of the hangar versus the lightness of the sabers created what he referred to as a "tone poem" that audiences would find appealing.
George Lucas: We went from having sort of "level one" of the swordfight with Obi-Wan, I then needed to progress to "level two" with Anakin because each time we have a swordfight, it's got to get more intense ... then I had Anakin cut a cable so I could do it in the dark. I wanted to go back to my old roots of a visual sequence, kind of a 'tone poem', lightsabers moving through dark and making it more of a 'visual' idea then an 'action/fighting' idea
Attack of the Clones: DVD Audio Commentary
It's like poetry. They rhyme. Every stanza rhymes with the last one
It's again notable that he used this same technique in Return of the Jedi in the fight sequence between Luke and Vader, moving from a well-lit stage to one largely in darkness. Audiences who'd seen the earlier films would recognise this sequence and it would generate a sense of nostalgia.