In the model of atom with a single electron (Bohr model) the energies of the electrons depend only on the principal quantum number n.
`E_n =-Z^2*E_1/n^2` , where `E_1 =13.6 eV` is the energy of first level
All the electrons on having the same n, but different angular and magnetic numbers (l and ml) have the same energy. It is said that the principal levels of energy are degenerate.
In reality, when the atom has many electrons, when writing the energy of a certain electron, apart from the energy coming from the main level n, there will be terms that show the electron-electron interaction. These additional terms (electron-electron interaction) will depend mainly on the angular quantum number l (therefore on the orbital in which the electrons are located if they are on the same principal energy level n) and to some less extent on the coupling degree between two electrons that are in the same suborbital (for example 2 electrons with opposing spins that are in the same px suborbital). On a diagram of energies, the p sub-orbitals will have a somewhat higher energy than that of s suborbital (for the same principal quantum number). The figure is attached. This is why for example the suborbital 3d is filled after 4s and before 4p.
If we take a look at the periodic table Al has the structure 3s2 3p1, which means that on the third level , the last electron is on the 3p suborbital alone. Thus it has a slightly higher energy that the other two and is easier to remove from the atom. Therefore the ionisation energy for Al will decrease.
Regarding S it has 4 electrons on the 3p level. 3 of the electrons are each in a suborbital px, py and pz, but the fourth electron is coupling with another electron in the same suborbital (let say px). As said above there will be a secondary energy term added that comes from the electron-electron spin coupling. Thus the energy of this fourth electron will be only a bit higher that of the other 3 electrons in the same suborbital, and therefore it will be easier to remove it. Therefore the ionisation energy of the S will decrease.