If you're installing the NES emulator, then there might be some law-breaking by installing the ROMs for the games, as they are copyrighted works. This is, legally speaking, piracy. Of course, if you have the original cartriges from the NES system or if you've bought the Virtual Console Downloads for the Wii, then installing the ROMs would pretty much count as Fair Use.
As far as whether installing things on the iPhone in general, you are neither breaking laws NOR voiding your warantee. As it's all software changes and as you can always do a full restore to factory settings, no one at Apple need ever know you've done anything. just don't mess with the hardware.