I'd say hacking it probably isn't illegal - unlike the Iphone, there's no contract with an Ipod. Far as I can see there's no encryption being broken.
Installing the apps probably is illegal if they're original Iphone apps, they're Apples software and you only get a licence to use them with the Iphone.
If they're 3rd party apps, I doubt there's a problem.
I'm not a lawyer of course, so YMMV.