When Tom Cruise realizes that Jada Pinkett is still in the building at the end of the movie, he cuts the electricity to the entire building by hacking through all the wires. Later Jamie Foxx and Pinkett go down the elevator to escape Cruise. Now I may be wrong, but don't elevators still run on electricity.
Just saw the movie today, so I might be wrong, but...
He probably just cut the power to the single floor. The building probably has separate circuits for each floor, so that a floor could be shut off for maintenance work, fire, busted pipes, etc. Since the board for these circuits is part of the maintenance of the building's infrastructure, it would probably be in the basement - not a storage closet somewhere on the 16th floor. Since elevators service every floor, they would probably have separate circuits, too - otherwise, an elevator would have to switch power sources every floor - not very practical at all, and subject to failure. As to why the doors opened if the power was out, the outer doors (elevators have two sets: the doors on the car and the doors stuck in the wall) are probably also on the elevator's circuit. This also explains why the parking garage, lobby and subway station were lit.
I think that he just cut the power to the one floor too. Because when Jamie Foxx breaks the window to go into the building, and he sees the dead security guard, the lights are still on in the lobby. Also, when Foxx and Jada escape from Tom Cruise, the lights are on when they run into the parking garage.