Well the big edges from spying come from conditional drawing and differential attack cards.
Start with the latter. Spies get a lot more valuable when you are going to pair them with your attack cards - namely jester and swindler. Being able to fish until you can leave something strong on top is radically powerful (the best being things like late game province -> peddler swindles or leaving top deck plat to jester). This can also be valuable for tribute where you want to leave things like islands or harems on top.
The biggie for conditional drawing is where you either only be able to draw certain cards (or card types) or where you can lace together strong cycling. For instance apothecary/spy is insanely good. Apothecary will leave up your green and actions allowing you to engineer spy sequences of: draw the card you want, discard a green (or whatever), draw, discard. Other times when you will want conditional drawing are things like scrying pool where dumping the odd treasure or green card can go a long way (also the synergy free draw of spies with SP is huge, as is the ability to churn through a long streak of killer opponent cards). Spies are also strong when you have cards with dangerous plays - upgrade being the prime example - knowing what you are going to hit can tell you when you should pass.
In general, spies get more powerful the more uneven your deck distribution. A pure silver deck gets much less benefit from spies than a deck of mixed plat and copper. High variance is good for spies. Cards that create high variance are things like KC, TR, Plat (highest variant card out there IMO), baron, etc. I'd easily say that spy is effectively +1 action +1.5 cards (given that you will play disproportionately more of your good cards and your opponent fewer, on some boards I'd even say that could go up to +1 action /+2 cards effectively).