As a matter of fact, jailbreak is needed in order to download YouTube videos. And in case you are already jailbreaked, you can look for YourTube Your tube (without space) in Cydia. That tweak will install a plugin in the YouTube app of your iPhone, you can then download any YouTube video and have them in your YouTube app for an off line usage. You can also access the YouTube video file if you have iFile so that you can upload the video to camera roll and share it from there.
Another way is to download and install safari download manager from Cydia. This tweak will allow you to download any files when browsing the web using safari, any files including you tube videos on safari browser, again you will need iFile to have access to those downloaded files.