Ten tips (in addition to, or expanding upon what everyone else has already said above):
1. Make sure you field a full army (eight units) of the latest age you have available. Attacking an army larger than yours is almost always suicide, but it can come down to tactics and what units you have available.
2. Make sure you have a mix of units. Every unit has attack and defensive boosts against one other type of unit. In a way, it's almost like and extended version of Rock-Paper-Scissors. A Light Unit has boosts against a Fast Unit, which has boosts against a Ranged Unit, which has boosts against a Heavy Unit, which has boosts against a Light Unit. Artillery Units also have boosts against a Heavy Unit, but no units get boosts against an Artillery Unit. Some units get either attack or defensive boosts for being on certain types of terrain (plains, forest, rocks). Some units have special skills that can make matters ... difficult. The bottom line is that you have to match the strengths of your army against the weaknesses of the enemy army.
3. Attacking against units of a later age than your army is almost always suicide.
4. Choosing Auto-battle is almost always suicide. Very rarely does the Game AI choose the best tactics.
5. You can gain a large cache of units over time through playing GE, and through finishing Quests. However, these units are all unattached. This means that if you lose one in combat, they are not replaced except by gaining new units by completing further Quests (or further GE play. Any unit you recruit from one of your Military Buildings, and is lost in combat, can be replaced by recruiting a new unit from that building.
6. You can gain permanent attack and defensive boosts for Attacking Army by building certain GBs (Statue of Zeus, Cathedral of Aachen, Castel del Monte). These boosts increase as you reach higher levels. Zeus should be the first one you have the ability to build (depending of course on how fast you can accumulate Blueprints - as with any GB). There are other types of military-related boosts available from GBs in later ages.
7. Some Special Buildings offer either attack or defense boosts. Attack boosts are only good when you attack. Defensive boosts only work when you are defending your city against someone attacking you.
8. You may also win attack or defensive boosts while completing quests (or encounters in GE). These are like the boosts above, except they are expendables and only work for a certain time.
9. The default Defending Army created by the Game is two of the weakest units in the game. Therefore it behooves you to always field a full Defending Army (eight units), manned by a mix of your strongest units. If you have only a limited number of units available, keep your Defending Army fully manned, even at the expense of you Attacking Army. You can always temporarily move units from your Defending Army to your Attacking Army if you need to attack someone. Just remember to return them to your Defending Army when you're done.
While units of your Defending Army that are lost in combat are automatically replaced after the battle even if they are unattached, if your Defending Army is defeated, whoever attacked you has 24 hours to plunder one of your buildings that has completed production. Most attackers who attack you and decide to plunder are after Goods. Not all buildings are susceptible to Plunder
10. Whether you can afford a strong Defending Army or not, it pays to get in the habit of collecting ALL productions (coins, supplies, goods) as soon as production is finished. No one can plunder anything that has already been collected.