When a magic item requires attunement, but does not specify any prerequisite, can anyone attune to it, or does the DM make up some prerequisite for it?
Example: Ring of Free Action pg 191 of the DMG only says it requires attunement.
Per Attunement of the 5e DMG (page 136, emphasis mine),
This bond is called attunement, and certain items have a prerequisite for it.
So, by default any character can attune to any item that requires attunement. If the item has a prerequisite, then only those who meet the prerequisite can attune to it.
See DMG 136, 138. There are plenty of restrictions placed on attuning of items, and they are all worth mentioning here. Attunement is a tax on the players, and the restrictions that come with it are there for game balance.
Even if a magic item that requires this does not specify a prerequisite, there are still a lot more restrictions the players have to follow besides that.
A creature cannot attune to more than three items at a time, unless they have an ability that can specifically override this (eg., The Artificer from the Unearthed Arcana)
A magic item can only be attuned to only one creature at a time
A creature can't attune to more than one copy of the item. For example, having three copies of a +3 Wand of the War Mage does not give you a +9 bonus from the magic items alone, but just the +3
Also note that if you stop satisfying the requirements for this (ex., you re-spec and stop being a spellcaster, or you get a forced alignment change), you lose attunement to that item. Also, being beyond 100 ft of an item you are attuned to for 24 hours will sever the attunement.
From DMG 285, attunement should be doled out to:
Prevent the players from passing around the same magic item to gain its lasting benefits (ex., the Book of Exalted Deeds);
Prevent the players from collecting too many of the same item. For example, if two items have stacking mechanical effects, there is an incentive to collect as many of those as possible. Attunement prevents that.
If an item says it requires attunement, but gives no other requirements for its use, the only requirement for its use is that a creature is attunes with it. In order to do this:
Attuning to an item requires a creature to spend a short rest focused on only that item while being in physical contact with it (this can't be the same short rest used to learn the item's properties). ... If the short rest is interrupted, the attunement attempt fails. Otherwise, at the end of the short rest, the creature gains an intuitive understanding of how to activate any magical properties of the item, including any necessary command words. -DMG p138 (bold added)
So the only requirements for attunement is that creature is able to be in physical contact with the object, focussing on it, for an hour. Any creature than can do so can attune to it.