Can the parking brake be set on an 737-800 if the aircraft has no power?
This function is provided by the parking brake valve which is an electrically-operated hydraulic valve that, when the parking brake is commanded to be set, closes and traps hydraulic pressure in the brake lines. You set the parking brake by pushing both brake pedals all the way down, and then pulling up on a separate lever that locks the pedals in the applied position and at the same time commands the parking brake valve to close and trap the hydraulic fluid. You can then take your feet off the brake pedals.

If there's no electrical power, that valve can't close. If there's electrical power, but no hydraulic power from the pumps, that valve can close, and the hydraulic pressure to hold the brakes is then supplied by the accumulator. But that's not as reliable as having the hydraulic pumps operating, and you're not assured that the pressure supplied by the accumulator is sufficient to prevent airplane movement. 

Moreover, closing the parking brake valve doesn't ensure a perfectly sealed system. Over time, internal leakage will mean that, if hydraulic power isn't constantly supplied, the trapped brake pressure will gradually leak to the point that the brakes can't hold the airplane, even though the parking brake lever and the brake pedals in the flight deck are still locked.