Both the yellow (called IV) and blue (called EV) numbers are basically extra stat points for your Pokemon.
IVs can have a number of 01-31. They are randomly assigned when you catch a Pokemon and can NOT be changed. 1 IV is equal to 1 stat point. Higher = better. IV priority should be given to whatever your Pokemon needs. For example Gastly needs Sp. Atk and Speed so those IVs should be highest. HP, Sp. Def, and Def are always useful so those should be relatively high. Atk is useless to Gastly so this value doesn't matter.
EVs are similar, but you can increase them by fainting different Pokemon and decrease them with certain berries. 4 EVs is equal to 1 stat point and, as with IVs, priority should be given to whatever your Pokemon needs most. Again using Gastly as an example you should be focusing on Sp. Atk and Speed EVs. Different Pokemon give different EVs when defeated; a quick way to check is to use https://pokemondb.net/ev and click on whatever EV value you want to train to see which Pokemon give that EV.
You can also use the Pokedex on the site I listed to check specific Pokemon for their Stats/EVs.
Generally speaking these values only really matter in PvP, with a few exceptions, as story mode is pretty easy.
edit: I forgot there was a guide I could just link to
https://pokemonrevolution.net/forum/viewtopic.php?f=123&t=15966