Using spies you can get information about troops, tech, buildings and resources. When you have your army built up and your defenses in place chances are sooner or later you are going to get into a battle with another player. You may attack them or be attacked by them but either way the battle will be decided by your armies. The Bigger army will beat the smaller army and win the battle. If the attacker wins they will be able to take resources that the defender has at their base. So it is very important to protect your resources and armies at all times.