It can that's why we are on a 5 year loan plan. But not at the expense of retirement. You can never get back those early years of growth in your 401k.
Trust me my wife hates her student loans and asks all of the time why we can't just put the 401k money towards them. I run a retirement calculator for her and show her she'll retire with millions. Then all is good again.
It all depends on how you invest the 401k, what interest rate the student loans are at, and what tax rate he paying. Remember that you will eventually be paying uncle sam taxes on that 401k in retirement. The common advice is that you will be paying at a lower tax rate in retirement...Not always true if you have put aside a significant potion of your income and have a generous pension.
If he has unsubsidized student loans with relatively high interest rate he may be better off paying off the loans first, especially if he is risk-adverse in his 401k and has other substantial tax deductions..
If, on the other hand, he has low interest loans, a high tax rate, and assumes a reasonably aggressive investment mix in his 401k, he might be better off putting more in the 401k.
Bankrate has many tools and articles about personal finance. Here is one that fits your situation...
Should You Pay Debt Before Saving? - Bankrate