Mostly, yes — but with a wrinkle. Downloading a ROM of a game you do not own is copyright infringement in most jurisdictions, and the sites distributing them are the ones most exposed legally.
Some countries permit you to hold a backup copy of software you have legitimately purchased. Where that applies, making a ROM of your own cartridge or disc can fall inside the law. The distinction collapses in practice the moment you download rather than dump, because a file from the internet was not your copy to begin with. If you care about the answer for your specific country, that is a question for local legal advice rather than a forum.