1) Emulating a system is NOT illegal. Using an emulating system to pirate software generally is.
2) There are plenty of emus for various platforms that run ON PS2 and Xbox, but what I imagine you're asking is if there are emulators to run PS2 and Xbox software on PC. The short answer to that is "no." The long answer is not "not any that work well."
Zophar's Domain is a pretty good place to start for emulator-related info.