Well it looks like we're headed in the right direction. A new bipartisan bill introduced to Congress aims to permanently legalize cell phone unlocking. The Unlocking Technology Act of 2013 explicitly legalizes phone unlocking and also modifies the DMCA to make clear that unlocking copy-protected content is only illegal if it's done in order to "facilitate the infringement of a copyright." If a circumvention technology is "primarily designed or produced for the purpose of facilitating noninfringing uses," that would not be a violation of copyright.
Last year, new DMCA rules made it effectively illegal to circumvent copyright protection to unlock a cell phone. A White House statement criticizing the new rule was issued in response to an online petition about the issue that attracted more than 100,000 signatures. Members of Congress introduced a series of bills to deal with the issue, but the verdict is still out on if and when this legislation will pass.
As of now, it is still legal to unlock your iPhone because our iPhone unlocking mechanism does not circumvention any copyright protection on the device.