I've been accused on several occasions for hacking because I knew where a cloaked spy was.
#1 cause of death among noob spies is: DISGUISING WHILE CLOAKED. If you do anything to your disguise while you are cloaked, you release a puff of smoke that is visible to others. Make sure you are hidden if you plan to uncloak or change disguises, they WILL know you are there.
After a while, you do get to know the map, as people say... there are spots that spies regularly hide (I can think of several in 2fort alone... near the sewer exits to the water and to the base, under the stairs in the courtyard, etc). I can also tell when I'm moving around if I'm bumping into something that shouldn't be there. Sometimes it is just lag, but I still jump around like an idiot and scream SPY! while firing in all directions just to be sure.
On the other hand, I've watched a lot of people get backstabbed because they totally missed a spy who made a stupid mistake! Using the C&D, but running out of cloak, for instance. Or decloaking in full view of another player, etc.