Here's a long answer
Depends on your country first, but lets say you live in the UK or US. ROM sharing is completely illegal, even if you own the game. But it's not a law that's usually taken anywhere except for takedown notices. There has only been one case in which illegal distribution of a game has resulted in jail time (as far as I know).
But if you want to backup your own ROMs? A bit of a grey area, but legal.
So the short answer is basically no - but nobody really cares what you do.
"NintenDON'T sue me please haha"