Dear Student
the atomic number of aluminium is 13.
It's electronic configuration is 2, 8, 3.
It has 2 electrons in the k shell (maximum limit in k shell is 2) and 8 electrons in L shell.
So the rest electrons are in the M shell, i.e. three electrons in the m shell (valence shell).
Aluminium has to fill its valence shell with 5 electrons (therefore carbon has 3 + 5 = 8 electrons in the valence shell) to gain a noble gas configuration (octet). Or by release of a 3 electrons from it will make the noble gas configuration and this is easier.
So the valency is 3.
Regards