Sending your Pokémon into battle to level them up is just one side of the coin when trying to make your Pokémon stronger. You will also need to train your Pokémon before you head into battle and is much more important when heading into bigger boss battles or if you plan to play Pokemon Sun and Moon competitively.
Every single stat counts and you need to check how your Pokémon are, to do this check the status screen for each Pokemon and you’ll see a graph representing the stamina, strength, special attack/defense and more. If you press Y, the graph will show you basic stats and another will show you how high the EVs are for each of those values. If a stat is shining. it means that stat is maxed out in EV’s. A Pokémon’s nature also affects these stats; ones which are coloured blue are lowered bad but the ones in red will be boosted.
Finally, if you want to check out a Pokémons IV’s, after you complete the game and hatch 20 Pokémon eggs, talk to the trainer outside the Battle Tree and he will give you the ability to check your IV’s. This is a hidden stat that can boost stats even further via Hyper Training and can be checked by using your PC. Make sure you have some bottle caps and level 100 Pokémon though or you can’t use this feature.