What you saw is called a speed brake, which is one of the functions of the spoilers. From the Boeing 737 NG FCOMv2 (9.20.5 Flight Controls - System Description):
Four flight spoilers are located on the upper surface of each wing. Each hydraulic
system, A and B, is dedicated to a different set of spoiler pairs to provide isolation
and maintain symmetric operation in the event of hydraulic system failure.
Hydraulic pressure shutoff valves are controlled by the two flight SPOILER
Flight spoiler panels are used as speed brakes to increase drag and reduce lift, both
in flight and on the ground. The flight spoilers also supplement roll control in
response to control wheel commands. A spoiler mixer, connected to the aileron
cable-drive, controls the hydraulic power control units on each spoiler panel to
provide spoiler movement proportional to aileron movement.
The flight spoilers rise on the wing with up aileron and remain faired on the wing
with down aileron. When the control wheel is displaced more than approximately
10°, spoiler deflection is initiated.
The speed brakes consist of flight spoilers and ground spoilers. Hydraulic system
A powers all four ground spoilers, two on the upper surface of each wing. The
SPEED BRAKE lever controls the spoilers. When the SPEED BRAKE lever is
actuated all the spoilers extend when the airplane is on the ground and only the
flight spoilers extend when the airplane is in the air.
The SPEEDBRAKES EXTENDED light provides an indication of spoiler
operation in-flight and on the ground. In-flight, the light illuminates to warn the
crew that the speed brakes are extended while in the landing configuration or
below 800 feet AGL. On the ground, the light illuminates when hydraulic pressure
is sensed in the ground spoiler shutoff valve with the speed brake lever in the
You noticed that the spoilers did not extend as much in the air as on the ground. This is intentional to reduce buffeting:
Operating the SPEED BRAKE lever in flight causes all flight spoiler panels to rise
symmetrically to act as speed brakes. Caution should be exercised when
deploying flight spoilers during a turn, as they greatly increase roll rate. When the
speed brakes are in an intermediate position roll rates increase significantly.
Moving the SPEED BRAKE lever beyond the FLIGHT DETENT causes
buffeting and is prohibited in flight.
The speed brake lever must not be moved above the FLIGHT DETENT while in the air. You can see it in the following image from the FCOM:
To answer your other questions:
If it is brake, do an airplane need brake in the air?
Yes, sometimes. Ideally a flight profile is calculated that does not require the use of brakes in the air. That means the Flight Management Computer (FMC) calculates a so called Top of Descent point at which you can start an idle descent. So the engines are retarded to idle thrust and the aircraft maintains the target speed by descending. This will get you on final approach at the desired altitude. Two things can happen now:
- Air traffic control does not allow you to descend when you want to. This usually happens when there is conflicting traffic and you have to stay at a higher altitude than the idle descent profile for a short while. Afterwards you need to descend faster, which may require the use of speed brakes. You can also try to just increase the target descent speed (since higher speed means more drag and gets you down faster), but if that is not enough speed brakes are needed.
- Air traffic control gives you a shortcut. This happens quite a lot. Some Standard Terminal Arrival Routes (STARs) involve some complex maneuvers and turns, but if traffic allows you can get a shortcut. Now your distance to the airport has just been reduced, requiring a steeper descent. Again, use of speed brakes helps here, especially when you are close to the airport already because below 10,000 ft you have to maintain 250 kt or lower, so speeding up is not an option.
If it is brake, is not more efficient to reduce the engine's power rather than to keep it constant power but brake to make it slower?
The engine will already be reduced to idle on a normal descent profile. Therefore using less power is not an option any more. Use of reverse in flight is usually prohibited for most aircraft, e.g. 737 FCOM:
Intentional selection of reverse thrust in flight is prohibited.