Because Nintendo (or The Pokemon Company International or whoever) owns a trademark on the term "Pokémon", they own the exclusive right to exploit the trademark for their own gain. If they become aware that another, unauthorized party is exploiting the trademark for their own gain, they have a legal duty to protect their exclusive rights. This is especially crystal-clear when money changes hands, and Pokemon Uranium's developer(s) had a Patreon, so on the surface (disclaimer: I am not a lawyer), there'd appear to be an extremely clear-cut case of trademark infringement there and Nintendo is, to some extent, being generous by only demanding a takedown and not actually suing.
In a case like AM2R where no money has changed hands, the issue is murkier, but still favors Nintendo; AM2R's developer used the Metroid trademark without permission, and released a free game with it in close proximity to Nintendo's planned release of an official Metroid game. Nintendo could likely successfully argue in court that a reasonable person who saw AM2R might mistake it for an official Nintendo product, which would be a very bad thing for them if it turned out that AM2R was substandard in some fashion (perhaps a bug prevents it from being completed, or it's infected with a virus, or the uninstaller accidentally deletes system32*). This was the core of Konami's trademark case against Roxor in 2005; because Roxor's product, In The Groove, was sold as a modification kit for Dance Dance Revolution machines rather than in its own dedicated arcade cabinets (at first), and many arcade operators did not apply the decals supplied by Roxor which were intended to be placed on the machines and would cover Konami's trade dress with their own, a reasonable person could have been able to believe that In The Groove was a Konami product. (There was also a patent infringement claim which is immaterial to this argument, but the facts also favored Konami there.) Konami's claims in that case centered on sections 32 and 43(a) of the Lanham Act, which would be equally relevant as concerns Pokemon Uranium and AM2R. (And, if you're wondering, Konami v. Roxor ended with the latter capitulating and signing a settlement which required them to destroy all unsold product and irrevocably turn over all copyright ownership in In The Groove to Konami.) Nintendo also has a vested interest in maintaining the case that Nintendo properties can largely only be played legally/officially on Nintendo hardware.
(* Obviously none of these are true; it's just a hypothetical.)
All of the above, of course, only touches on the trademark issues, and completely ignores the massive copyright problems with both fan games, which are a completely separate problem. AM2R - necessarily, because it's billed as a fan remake of Metroid II: Return of Samus - replicates the level layouts of Metroid II. The level layouts are copyrighted data. So, too, is Samus' general design, the designs of the enemies in the game, etc. (The actual game physics, however, are not copyrightable, and indeed, AM2R's developer could have made a game that plays "like" Metroid II but with a different main character, different enemies - even if they have similar game behavior - and different level designs, so long as he reproduced the game physics independently, i.e. didn't directly lift the code from Metroid II.) This is, for instance, what happened with the original Great Giana Sisters game on Commodore 64 back in 1987; the first level of the game substantially copied world 1-1 of SMB1 (though the later stages deviate), and Nintendo issued a cease-and-desist order to the publisher, which they complied with and ceased distribution of the game. (Contrary to popular belief, Nintendo never actually sued over GGS.)
Pokemon Uranium has these problems as well, because while, again, the basic rules of Pokemon are not copyrightable per se, graphics and such are, and Pokemon Uranium uses lots of assets from the DS Pokemon games, as well as copying their general user interface design.