By all accounts, emulation is perfectly legal. However, obtaining the games for emulators is usually done through illegal means. Therefore, make sure to buy your games from authentic places.