Mostly grades. However, you are elected in by your peers (last year's AOA's if you are a junior or your AOA classmates if you are regular AOA), so your attitude and extracurriculars do play a part.
P.S. Junior AOAs are elected at the end of third year and constitute the top 3% of the class.