Assalamu alaikum,
a) There is one type of student loan where you can pay back within a certain period, without giving any interest. This is halal if all are paid-back without any extra money (interest).
b) If the student loan is not as above, and payback involves paying interest, then this is usury (riba), so the original/default ruling for this that it is haram and a major sin. But if there is a necessity, then only one can take an interest-based loan.
Now the issue is: what is 'necessity'?
Based on requirement, a matter can fall in one of 3 categories as per usul-l-fiqh.
- necessity (darurat): this means without which you can't live, like - food, clothes.
- need (hajat): this means you can live without this, but without this, you will have inconveniences.
- beautification (tahsiniyat): this only beautifies life. there is no need or necessity of this.
Example of 'necessity' is that if you are dying of starvation and you only find pork to eat, then pork become halal at that time.
Example of 'need' is - you need a car to go to work in the USA if buses are very few and infrequent. So this need makes car insurance (the minimum that is required by law) halal.
Example of 'beautification' is that you buy a luxury car instead of a regular car.
--the above has just set the stage for understanding ---
Now the student loan. Is it 'necessity' or 'need'? The vast majority of scholars will not put this in 'necessity' bucket. Maybe a 'need' on a case-by-case basis.
Now, what type of sin is usury (riba)? This is a major sin.
A major sin can't flip a 'need' from haram to halal.
So by default, this riba will earn him a major sin.
But if your case is special and you think higher education is a 'necessity' for you, then talk to a scholar or a knowledgeable imam.
Otherwise, it is a sin.
Hope this helps, in sha' Allah.