While most "Pokemon Sun and Moon" players can just evolve an Eevee into an Umbreon or an Espeon. For those seeking a bit more of a challenge, then there is a way that you can catch both Pokemons in the wild.
For those wondering what an Umbreon and Espeon are in "Pokemon Sun and Moon" then here is a detailed comparison from Pikasaur. Basically, that shows the player the types of abilities and moves the two Pokemon have.
Umbreon
According to Twinfinite, the way to catch an Umbreon in "Pokemon Sun and Moon" is by heading to Route 4 or 6 during the night time. This is because the Umbreon is known to appear during the night as it is a moonlight Pokemon. The player must then venture to the tall grass and look for an Eevee to battle with. Once an Eevee is found make sure that you have a Pokemon that has both the false swipe and a non-combat move. Battle the Eevee using the false swipe so that the player does not accidentally make it faint it. Make sure to leave one HP so that the Eevee can still call for help if it does not arrive then give it a non-combat move like Leer or Growl to keep the battle going on. Keep going until the Eevee finally summons an Umbreon. Make the Eevee faint and catch the Umbreon with a Pokeball.
Espeon
In "Pokemon Sun and Moon" catching the Espeon is almost the same as catching the Umbreon. The only difference is that the player will have to do this during the day. Whichever the player chooses to catch, always remember that this will take a lot of patience. So pack a lot of Pokeballs as well as potions to keep the battle ongoing. Happy hunting!