Yes, it's legal to jailbreak your iOS device. Jailbreaking your iPhone, iPad, or iPod doesn't violate the Digital Millennium Copyright Act (DMCA).