After you've trained your Dragon to a higher tier, you can level it up in order to increase its overall power.
To do so, you can donate up to 10 Dragons to the Berk Dragon Academy. While you are selecting Dragons to release, look at your level bar to see which level you would reach. Pay a corresponding amount of fish and level up.
At the bottom, you see the chances of increasing your ability ranking. The more Dragons you will donate and the rarer they are, the better are the chances for your own Dragon to gain a higher ability rank.
Donating Dragons to the Berk Dragon Academy provides experience to your Dragon equal to that which you have provided other Trainers.