I'll tell you some situations where I kill spies.
- When your disguising, make sure you do it before going out or while you are completely cloaked. If you are not completely cloaked then smoke is visible even though you are cloaked. Using the smoke I can actually guess where you're head is, its a tricky shot but I can do it more often then not.
- If you're not fully cloaked when you're leaving and I see you, sometimes I'll take a guess shot, where I'll predict where you moved and shoot generally in the head area. It doesn't always work but I've gotten lucky.
- If you've been revealed I'll take a shot. I spend very little time in scope, so if you bump into someone and you're visible for a split second, that's sometimes all it takes.
- If you were very recently healed by friendly medic or are walking past a dispenser thats sometimes a way to see you, although I have never personally killed a spy as a result of those things.
- I'll headshot teammates when covering an area. If they're on my team they won't care. Spies drop dead, although it's possible to miss since the hitboxes do not change for the model that you are disguised as, so for example if you look like a heavy, i have to aim a bit lower than the heavies head to garentee a headshot on a spy. Rule of thumb, I should never see you uncloaked/acting suspiciously, or you aren't playing spy properly.
- Try not walking infront of snipers. Expecially in intense combat situations. I'm usually firing off many quick shots, I've had a few spies accidentally drop dead when I was aiming for someone else. Which it pissed me off cause I would of killed the medic if it weren't for you...

- Sometimes its just dumb luck. I'm in some awkward location shooting for someone else and you get killed. However this happens rarely and never happens twice in one game.
So basically, if you are absolutely sure you were careful about those things, then he probably was hacking. Lightning doesn't strike in the same place 4 times. You should of tried speccing him.
One last tip, a good sniper will rarely charge in cover and walk slowly around corners. Hackers do, though.