As a tank, your main goal is to mitigate damage, which means that avoiding taking as much damage as possible, be it through your armor reducing it, dodging, parrying or blocking with a shield. As secondary stats, stamina increases your ability to dodge, parry and block as well as your armor level while it is important. As a tank the stats you should be looking for are primarily +defense, with agility coming in close to stamina, as it usually only increases dodge chance.
Because this is to reduce the amount of healing the healer has to do. If you've extremely high stamina, but every bit of damage done to you takes away from your health, then the healer has to use far more mana than if you had much less stamina, but most of the damage was somehow mitigated, so it didn't need healing.
+defense is an extremely important stat at later levels and to be a good tank you should aim to be "defense capped", which would result in mobs and bosses being unable to cause critical hits on you. The amount of +defense you need varies depending on how many levels above you the mob is, but if you get to the uncrittable point, you will be much better tank gear wise.
As a DPS class, you main concern is causing as much damage as possible; the part of your gear that is frequently overlooked in a group is threat reduction. At the higher levels there are a number of trinkets, cloaks and enchants that help reduce your threat, which in turn allows you to do more damage without pulling a mob off the tank. Some of these may allow you to do more damage than an item that is more for increasing damage, as they reduce your threat significantly, which allows you to keep fighting when you would have to stop in order to reduce your threat.
You should choose your attacks or spells to minimize threat while keeping damage high, aside from trinkets because some abilities generate much higher threat than others.
There you kill the enemy as fast as possible but in the meantime you should be concerned with helping to keep all the other members of the group alive as DPS gaining aggro is one of the biggest causes of 'wipes'.
The reason is that when DPS gains aggro on a mob and the mob attacks the DPS instead of a tank, the healer will have to do lot of healing to keep the DPS alive while this happens. In that DPS have much lower damage mitigation than a tank.
When healers heal, it increases their aggro and because it can be hit and miss whether a DPS can survive being attacked, despite being healed, it puts the healer in danger.
When a DPS dies, and has received a lot of healing, then the next group member in the mob's list of things to attack will be the healer, the class that usually has the least amount of health and armor.
You risk getting the healer killed and are putting the group at risk if you pull aggro as a DPS. If you do not die, the healer will have expended lots of mana, which keeps you alive that should have been available to keep the tank alive. And if you've stopped attacking to reduce your threat, then the mob will still be attacking you until your threat is reduced, and the healer will still be healing you increasing their threat, so they may overtake you in the mob's list and end up pulling the mob.
In order to balance your stats most effectively, you should look elsewhere for more guides in depth for your chosen class and talent build; however, this is only a basic overview. Each class and each talent tree has its own particular play style and gear requirements, so you're much better off learning about your chosen class and talents.