There are four attributes: AIM, Defense, WILL, and Mobility.
Defense and Mobility are the same for all soldiers, and so do not need to be considered.
WILL is used two places. Panic checks and psionic attacks/defense. A high WILL stat allows you to panic less frequently, resist psionic attacks and hit more frequently with psionic attacks.
WILL values start randomly and increase random amounts with ranks. The rank up amount is higher once Iron Will is purchased. Checks involving WILL are modified by PSI Armor and Mind Shield.
AIM is used to determine a gun attack's chance to hit. If you press F1 while you have an enemy targetted during an attack, the chance to hit will be displayed. The base chance is exactly your AIM score : 65 AIM = 65% base chance to hit. Items which improve AIM checks include Scope and Light Plasma Rifle, as well as pistols with Improved Pistol II.
AIM values are the same for all rookies by default. AIM increases with ranks at a rate determined by the soldier's class. Snipers have the highest AIM, followed by Assault and Support (tied), with Heavy having the lowest AIM.
Heavy's low AIM is not as big of a liability as it sounds. Heavy should usually spend the turn firing twice (compensating for low AIM), suppressing or launching rockets (actions which do not require AIM).