In the USA, it is perfectly legal to use Cydia but, should you need to return your iOS device to an Apple store for repair, Apple may void your warranty if the device is jailbroken.