The Enterprise was hit on the left warp nacelle, but as happens to both ships (and very frequently in Star Trek) random energy discharges occur around the ship, including on the bridge, not only turning out the lights on the bridge, but frying Scotty's automation system with which he has been controlling the ship. It doesn't seem to have done much major damage, but the ship was already heavily damaged in Star Trek 2: The Wrath of Khan, and this system is crucial to letting the few people onboard control the ship's systems.
As this wasn't clear to everyone in the answers and comments, I've elaborated the way the film lays this out below (quoted from the "final" script draft at http://www.scifiscripts.com/scripts/Trek/Star_Trek_III.htm:
This is not the first mention of this automation system. At the start of the film, Kirk and Scott discuss this:
Scotty. Progress report?
I'm almost done, sir. You'll be
fully automated by the time we
Your timing is excellent, Mr.
Scott. You've fixed the barn door
after the horse has come home.
How much refit time till we can
take her out again?
Eight weeks, sir.
(as Kirk opens
But you don't have eight weeks so
I'll do it for ya in two.
Mr. Scott. Have you always
multiplied your repair estimates
by a factor of four?
Certainly, sir. How else can I
keep my reputation as a miracle
Your reputation is secure, Scotty.
So, the Enterprise was badly damaged in the previous film's events. Kirk is asking Scotty, legendary ship's engineer specialized in this ship, to have the ship ready as soon as possible, by "working miracles."
When they arrive at base, Scotty is reassigned to working on the Excelsior, but he moonlights on the Enterprise to jury-rig an automation system without the benefit of staff. When Kirk and friends arrive on the Enterprise bridge to commandeer her, Scotty says:
As promised, she's all yours,
sir. All systems automated and
ready. A chimpanzee and two
trainees could run her.
In other words, he has managed to rig an automated setup so that despite battle damage, two or three people could operate the ship which usually has a crew of about 400.
Also, just before the Klingon ship fires on the Enterprise, Chekov is unable to raise shields. Scotty says:
The automation system's
overloaded. I didn't expect to
take us into combat, ya know...!
When the ship is hit:
A blast hits. Scotty's panel sizzles... LIGHT OUT!
This seems to be the locus of Scotty's automation system, or at least his controls for it.
The light return, EMERGENCY MODE. The ship rights
itself. Kirk has been knocked down. Bones to him --
I'm all right -- stand by to
return fire! Mr. Scott, transfer
power to the phaser banks --
Oh, God, sir, I dinna think so...
They've knocked out the damn
panel in rage)
I've got no control over anything!
Kirk pales, looks quickly to:
But Sulu's gesture says he has no control of helm, and
Chekov also shakes his head in helplessness. Kirk
digests this. Then:
So... We're a sitting duck.