All you can really do is make sure the information matches up with what the information on the Pokemon should say. That is, catch location, stats, etc.
There are ways to export your Pokemon into files to do further checking with the aid of various programs, but that is sort of hacking on its own so I doubt most people who just want to do casual trading are going to bother.
If it looks like a Ducklett, quacks like a Ducklett, has moves like a Ducklett, was caught where a Ducklett should be caught, and has stats like a Ducklett... It could still be hacked. If you use the most advanced technology possible and compare the data byte-by-byte to what it should be, and it passes... it could still be hacked. The only real, sure, 100% successful way to never receive a hacked Pokemon is to never trade. But that's boring.
I recommend to trade with people you know who feel the same way you feel about hacks. It's a crapshoot on the gts, you could get anything. And always check the summary of the Pokemon before you trade and make sure nothing seems off to you.
Catch location: If it is a caught Pokemon, make sure the Pokemon can actually be found there. You can use Pokearth on serebii.net, or any one of the Pokedexes available online. For event Pokemon, there are many resources telling you what this should say.
OT: If you are trading with a friend that you trust, the OT should be theirs (except event Pokemon), if it isn't, you should ask them where they got the Pokemon. Based on what they say, it is up to you whether to trust it or not. It's always okay to politely decline if you don't feel comfortable. If you have gotten a hacked Pokemon from the same OT/ID numbers before, it is likely also hacked.
Trainer ID: An ID of 00000 is common if someone hacked a Pokemon and just forgot to put a number on the ID space.
These two pages have the different gen V event Pokemon and what information they should have in case you're not familiar:
Local (IRL) events, i.e. gamestop
If the person you are trading with has a thread on a forum for their trades, you can read what other people have said after trading. If other people complain about hacked Pokemon, it is very likely that that person has hacked Pokemon. Though of course, sometimes other people can be wrong, so be careful out there.