TL;DR emulators are legal, as long as you use game files you have legally acquired by buying the game and dumping it yourself. Using game files from online is illegal.
It can be fine as well if it can legally be downloaded. For example, it's possible to get the official firmware directly from Sony or play some homebrew software.
And I'm sure it's possible to find some game demos as well.