"In response to an email sent to
Pokémon.com's mailbag, Pokémon.com posted the following:
"I'm very sorry, but the Pokémon Company does not answer questions of this nature. It is the intent of the Pokémon creators that such questions be left to the imaginations and interpretations of Pokémon fans, adding more excitement and mystery to the Pokémon universe."
So the title and criteria for attaining it is intentionally left ambiguous. Becoming a Champion or an Elite Four member or something to the effect may reflect one's 'mastery' as a trainer - but that'd be more akin to a martial arts master, or a master chef - being considered sort of an authority in your professional vocation and/or way of life.
The other common theory is the ridiculous "Catch 'Em All" one - which is
beyond nonsensical as it is
literally impossible to 'catch 'em all'. Only in the games can one complete a Pokédex - which makes sense as collecting monsters herp derp is a game mechanic - in a more realistic setting the 'Legendary' species would likely be so insanely rare that just ENCOUNTERING them would be borderline miraculous, let alone catching any of them (not to even mention the power levels of a few of them and the strong will of some who do not have any intention of being captured or may only appear before specific people due to some heroic resonance bullshit or another) - and seeing how new species just keep getting discovered... yeah, no one trainer could ever actually catch
all Pokémon, until the series officially dies and no longer developed - which honestly makes the whole thing moot to begin with.
Tl;dr, it's a bullshit title, it means whatever the hell you want it to mean.