united-states
There is no one-size-fits-all answer to this question. It depends on the game.
The difference between modding and cheating is largely a matter of semantics. In some cases, cheaters can use facilities which are deliberately built into the game, without modifying it (e.g. cheat codes, console commands, etc.). However, it is difficult to see how making use of such facilities could possibly violate any law, regulation, or agreement, and so the rest of this answer will focus on modding.
I think it would help to walk through two specific examples, to illustrate the broad range of possible answers to this question. Here are the examples I chose:
- The Elder Scrolls V: Skyrim for PC ("Skyrim" for short)
- Super Mario Odyssey for the Nintendo Switch ("SMO" for short)
Both of these games are single player (although SMO has a minor, optional multiplayer component), and both have been extensively modded by their respective communities.
Skyrim
Skyrim's Creation Kit EULA expressly authorizes modding, and the wording implies that mods are the intellectual property of the modder (because it states that the modder automatically grants a license to Bethesda). Bethesda even permits modders to sell Skyrim mods for real money, which is practically unheard of in the video game industry (even under the very restrictive terms which Bethesda sets for such paid mods). Bethesda's open authorization of and acceptance towards modding, and the fact that they deliberately provide modding tools in the first place, makes it very difficult to characterize Skyrim mods as anything other than legal.
However, if you try to circumvent Steam's DRM, or sell mods for money without going through Bethesda's paid mods program, then you are certainly violating one or both of the EULA linked above and the Steam EULA. Such violation could subject you to civil liability under a variety of legal theories, but in practice, the most likely outcome is that Valve terminates your Steam account (as the Steam Subscriber Agreement says they can) and you lose all the games you previously purchased. But they're not going to waste their time suing you, unless you somehow make a nuisance of yourself.
Paid mods, outside of Bethesda's system, might even be criminal copyright infringement, although I would be rather surprised if it were actually prosecuted as such (the DOJ generally has more important things to worry about, and copyright infringement can't be prosecuted at the state level). If you're willing to call civil liability and unlikely-to-be-prosecuted criminal liability "illegal," then Skyrim modding can be illegal if you violate the terms and conditions.
One other thing: The terms linked above also say that mods ("New Materials") can only be distributed "to other authorized users who have purchased the Product, solely for use with such users’ own authorized copies of such Product and in accordance with and subject to the terms and conditions of this Agreement and all applicable laws." In other words, you are not supposed to distribute mods to users of pirated copies, which is probably impractical to enforce in any meaningful way (modding sites generally make no effort to verify that individual users have actually purchased the game, although in theory it might be technically possible to do so). In my experience, modders are often quite hostile to users of pirated copies of Skyrim, because such copies are nonstandard and more difficult to support. Bethesda evidently views this in-practice hostility as "good enough."
SMO
SMO is a completely different ballgame. Nintendo does not provide modding tools for either the game or the console on which it runs. Furthermore, Nintendo has repeatedly updated the console to prevent people from modding it, and to break or render ineffective existing techniques for such modding. Their stated rationale for this activity is to prevent users from running pirated games on their consoles. Therefore, this brings the whole thing into the scope of the DMCA's infamous anti-circumvention provisions. 17 USC 1201 provides that:
(a)
(1)
(A) No person shall circumvent a technological measure that effectively controls access to a work protected under this title. The prohibition contained in the preceding sentence shall take effect at the end of the 2-year period beginning on the date of the enactment of this chapter.
[...]
(3) As used in this subsection—
(A) to “circumvent a technological measure” means to descramble a scrambled work, to decrypt an encrypted work, or otherwise to avoid, bypass, remove, deactivate, or impair a technological measure, without the authority of the copyright owner; and
(B) a technological measure “effectively controls access to a work” if the measure, in the ordinary course of its operation, requires the application of information, or a process or a treatment, with the authority of the copyright owner, to gain access to the work.
It doesn't matter whether you are trying to commit piracy or not. It only matters that:
- You "avoid, bypass, remove, deactivate, or impair a technological measure," and
- The technological measure "effectively controls access to a work" as defined above, and
- You did it without Nintendo's permission, and
- Your action doesn't fall under one of the permanent exceptions listed in 17 USC 1201, nor under any of the 3-year exceptions which the Librarian of Congress is authorized to temporarily grant.
So by breaking the DRM on the Nintendo Switch, which is a prerequisite for modifying SMO, you necessarily violate 17 USC 1201, unless you fall into one of the exceptions. Of those, the only one which is even colorably relevant is subsection (f):
(f)
(1) Notwithstanding the provisions of subsection (a)(1)(A), a person who has lawfully obtained the right to use a copy of a computer program may circumvent a technological measure that effectively controls access to a particular portion of that program for the sole purpose of identifying and analyzing those elements of the program that are necessary to achieve interoperability of an independently created computer program with other programs, and that have not previously been readily available to the person engaging in the circumvention, to the extent any such acts of identification and analysis do not constitute infringement under this title.
("This title" means Title 17, which is the entire copyright law of the United States.)
This is basically saying that you can bypass DRM for the limited purpose of making "an independently created computer program" interoperate with "other programs." The problem here is that most mods are going to be derivative works of some kind, and just creating a derivative work, even if you never distribute it, is generally copyright infringement under 17 USC 106. And the exception-to-the-exception is that it doesn't apply whenever you infringe any copyright, regardless of whether the DRM was intended to prevent you from committing that specific act of infringement or not.
There is some room for debate over whether mods can or should be considered fair use, which is beyond the scope of this discussion. Suffice it to say, it's a complicated, fact-specific inquiry, which is not compatible with sweeping "modding is legal/illegal" statements. We also don't have much good case law for it. Regardless, the Switch's EULA expressly prohibits modding, and so you would still be liable for a contractual violation anyway.