Every three years, the Copyright Office reviews the rules for unlocking and jailbreaking your phone as part of the review of rules that the DMCA mandates.
This time they determined that there were enough unlocked phones for sale, and therefore unlocking your own without the permission of your carrier would be illegal.
Proponents of unlocking argued that “some devices sold by carriers are permanently locked and because unlocking policies contain restrictions and may not apply to all of a carrier's devices."
The Copyright Office wasn’t buying: "with respect to newly purchased phones, proponents had not satisfied their burden of showing adverse effects related to a technological protection measure."
They did (on Oct. 28th of 20120) give consumers a 90 day period to unlock their phones without permission. They upheld the ruling that jailbreaking (running unauthorized apps) would still be legal, although it could certainly void your warranty (iPhone is the main phone affected by jailbreaking).
The jailbreaking rule was not extended for tablets because the proposed definition for a tablet was too broad.
You can sign a petition to ask the Copyright Office to reverse its decision based on the argument that “the resale value will be reduced while they have already been been purchased by the user, will force exorbitant roaming fees and reduce consumer choice.”
The petition has about 7,000 signatures but needs another 93,000 by Feb. 23rd in order to receive a formal White House response.