The AT-ATs pictured above, used in
The Empire Strikes Back were based on an earlier design, used in
Attack of the Clones. The earlier design was used by the Republic against it's foes. THe Jedis were on the Republics side.
After Palpatine/Emprorer/Darth Sideous locks himself in office and destroys the Jedi, he does so via Vader and I am sure other, more underhanded methods.
The AT-AT has a very simple purpose. To get troops past base shields for deployment. The AT-AT stands for "All Terrain Armored Transport".
The general idea is, to be able to have it get over terrain which treaded and hover vehicles might not.
Here are some excerpts from a site that explains the AT-AT well.
--SNIP--
Mobile Infantry Combat Vehicles: The AT-AT Walker
General Capabilities
The most famous type of Imperial armoured vehicle needs little in the way of introduction. The AT-AT (All Terrain Armoured Transport) walker is a heavy assault vehicle which combines some of the characteristics of tanks, artillery, and MICVs. Although one could make an argument for its classification in any of those categories, its cargo capacity (40 men and 5 speeder bikes) leads to a primary classification as an MICV, albeit one of astonishing size and power. There are enough misconceptions about the AT-AT walker that it deserves its own discussion, so it will be discussed separately from other Imperial MICVs.
An AT-AT's basic capabilities are fairly well known: its armour shrugged off direct hits from Rebel artillery fire or snowspeeder guns in the Battle of Hoth. Its combination of two heavy chin-mounted guns and two light side-mounted blasters (seen above) have variable firepower and enough flexibility to target and destroy anything from infantrymen to enemy artillery pieces, low-flying aircraft, and even entire installations as far away as the visible horizon. However, its mechanized underside is vulnerable if you can get close enough to exploit it, and it has two dorsal vents which appear to be vulnerable points. Its maximum speed over flat terrain ground is said to be over 60 km/h, which would mean that it can cover its own length in roughly 2 seconds at full speed.
--SNIP--
http://www.stardestroyer.net/Empire/Tech/Ground/Armour-SW.html