You just have to use common sense.
If a pokemon is caught, met or hatched at a level or place that can never be achieved in the game, then it is obviously hacked. If it's stats exceed its maximum then it hacked.
If the O.T. is ????? then it is definitely not legit.