Well, you can't be so sure, now that hacking is VERY advanced these days...
but anyways, a good indicator is that Deoxys knows the moves it should at that level. Also, when you see the words "Fateful Encounter", 85% of the time, it's a legit Pokemon. Also, if you had to trade something rare for it, that's also another notable factor it is not hacked. But as I said, you can't be 100% sure, sadly...