Jailbreaking was officially declared legal on July 26, 2010 by the U.S. Copyright Office. Unfortunately the ruling handed down by the U.S. Copyright Office was not permanent and it will be expiring soon, and if it doesn't get renewed then jailbreaking will not be legal anymore. The EFF wants to convince the U.S. Copyright Office to renew the jailbreaking exemption, and also expand it to tablets and allow the jailbreaking of video game consoles as well.
You can help keep jailbreaking legal by submitting comments to the U.S. Copyright Office. Go to EFF's Jailbreaking is Not A Crime webpage, read their page, and following their link to submit your comments to the U.S. Copyright Office. The deadline for submitting your comments is on February 10 at 5 PM Eastern, so be sure to submit your comments by then.
[Update] The developer of Cydia, Saurik, posted the following comment: