As you know the periodic trends in electronegativity can be described as
- electronegativity increases as you move from left to right across a period
- electronegativity decreases as you move down a group
These trends make a special relationship, called the diagonal relationship, be possible for some elements from periods 2 and 3.
Basically, these element pairs
#"Li " - " Mg"#
#"Be " - " Al"#
#"B " - " Si"#
have very similar properties, including electronegativity values. That happens because the two electronegativity trends compete against each other.
In your case, beyllium is located in period 2 and aluminium in period 3.
This means that if you go by the way electronegativity changes down a group, beryllium would be expected to have a higher electronegativity value.
However, beryllium is also located in group 2 and aluminium in group 3.
This means that if you go by the way electronegativity changes across period, aluminium would be expected to have a higher electronegativity value.
So which trend wins?
In these cases, neither one, and so the two atoms have very similar electronegativity values.