The general consensus I’ve usually heard is that if the question is “is it all right from a legal standpoint” to emulate, then the answer is generally a flat no (with some exceptions I guess being the original devs giving the OK, or the game has officially become freeware perhaps).
But if the question is “is it all right from a moral standpoint” to emulate, you get a greater variety of answers. My thought on the matter has generally been, if it’s a game currently available on current hardware then you really ought to buy it. The problem is that there are lots of older games that were less popular than, say, the Marios and Final Fantasies, and thus have not been re-released in any capacity for many years.
I would more than happily buy a re-release of Snatcher for example, but that’s probably just never going to happen – and I’m not too anxious to buy a Sega CD (that might not work) and pay $600-$1000 for a used copy of the game (that might not work). I’ve gone to great lengths for certain retro games in the past, and though I’ve never spent nearly that much money on a single game, it can still be a big hassle just getting everything to work properly. And the original devs of course aren’t making a single cent off any of that in the first place… so you might as well just emulate Snatcher. (Not to mention, for many older games, the studios that made them don’t even exist anymore…)
In the meantime, I make an effort to buy lots of re-releases for classic games – mostly for the sake of playing them, but also to encourage devs to continue bringing back more. I love the ACA Neo Geo and Arcade Archives releases, the Sega Ages lineup, and even NES and SNES Online for the Switch. But there are still loads of classics that have been lost to time, especially for certain eras and platforms. (The arcade and home console releases of the late 90s to early 00s especially seem vacant for maintaining a current-day presence – probably because such 3D titles would take a lot more effort to bring back [in a satisfactory manner] compared to 2D pixel games.)