So, technically using software to unlock digital carrier blocks on your phone in the US is a violation of everyone's favorite draconian copyright legislation, the Digital Millennium Copyright Act. Unlocking your phone yourself could be seen as breaking a "technical measure," akin to cracking a DRM package (which, in most cases, is illegal). The Library of Congress can grant specific exemptions, like it already does for rooting and jailbreaking, but the latest one in 2012 was passed over without renewal. A bill to re-instate legal unlocking by consumers passed the Senate earlier this month, and now the House of Representatives has also passed the Unlocking Consumer Choice and Wireless Competition Act. It instructs the Library to make the exemption once again.
If you remember your Social Studies classes, you'll recall that the only thing left to do is to have President Obama sign the bill, thus letting consumers (and third-party resellers) unlock their devices without fear of legal backlash. And since the administration expressed complete support for petitions on phone unlocking back in 2013, it's basically a done deal. The president has stated that he looks forward to signing the bill into law. In a rare show of unilateral action, all 100 senators and 435 representatives passed the bill unanimously. That's kind of amazing, since the various political parties and ideological cliques tend to fight like cats in a sack on everything else.
Most carriers already provide at least some means of unlocking phones for end users, but they don't make it easy. Customers have to contact the carrier and receive permission, which usually means no outstanding bills or credits. Now consumers and third parties like independent cell phone shops will be able to unlock phones via whatever means they want without violating the letter of the law. Of course, actually getting your phone to work on another carrier is all up to you. Good luck, CDMA users.
The Library of Congress will have to re-approve the measure again in 2015, and every three years after that, for as long as the DMCA is in place. Hopefully this bipartisan show of support will mean they renew it several times more.