Soldiers attack enemies and give you up front plunder as well as damage in eb's and loss of troops to an enemy player.
Spies on the other hand can be used in three different ways.
Scouting-to see what buildings your opponent has, and your odds of winning an attack on them.
Stealing-steals money from your enemy and gives it to you.(usually a smaller amount than an attack will give you.)
Assassinating-which is used a lot in eb's and is useful In killing off tons of enemy soldiers.
In all three cases with spies if the action is successful the opponent cant see who is attacking them.
When you attack the enemy always knows who did it, even if the action was successful.
It all boils down to choice what you want to be, but a majority of players would say spies are better. Including me.