Ordinary xenomorph drones are shown to have a basic understanding of cause-and-effect that allows them to learn quickly via observation, as demonstrated in Alien: Resurrection when first they turn the liquid nitrogen that's been used to control them against their captors (cause: button pushed, effect: LN2 dispensed).1
However I do not believe that understanding extends to lights and electrical wires, because the drones have not demonstrated such an understanding at any other time in the series, even at times when it would have been extremely useful/advantageous (in terms of plot) for them to have such an ability. While they can connect that pressing a switch results in a light turning on or off, they do not appear capable of conceptualising that there is some sort of connection between the two that can be interfered with.
It is true that the drones on LV-426 have, at the time of Aliens, been alive for far longer than most xenomorphs in the series, and as such they could quite conceivably have observed humans performing maintenance-related work involving wiring, thus allowing them to determine that there is a "something" between a light and a switch and that "something" is a potential point of vulnerability.
In Resurrection it is possible drones could have been exposed to an experiment that e.g. put two simple circuits next to each other, then broke the wire of one to demonstrate that the light goes out - but of course that occurs after the events of Aliens.
In my opinion, the lights going out on the Marines is due to one of two things:
- Hadley's Hope was already pretty smashed up from the desperate battle between the colonists and xenomorphs. Any and all redundancy in the power grid was likely gone by the time the Marines arrived; the drones could've inadvertently destroyed the last link when moving to make their attack on the Marine position.
- Interference (directly or indirectly) by the xenomorph queen. Queens have consistently been demonstrated to be far more intelligent than their drones (for example the queen from Aliens was able to control the elevator and stow away on the dropship), so it's no long stretch to consider that the queen either directly sabotaged the power herself at the most opportune time, or simply instructed one of her drones to do so.
The second feels like the most likely explanation, and the unofficial wiki seems to agree with this assessment.
So yes, the xenomorphs did intentionally cut the power, but it was most likely the queen and not the drones ultimately responsible for doing so.
1 The fact that the experimented-on xenomorphs in Resurrection know their blood is highly corrosive and used that fact to escape their containment, points to some sort of intrinsic (genetic?) memory inherent to the species (referred to as "hive memory" by some sources). The Ripley-clone's memories of her past, "original" self are likely due to this same ability that she was granted as an inadvertent side-effect of splicing her genes with the xenomorphs' to recreate a Queen.