Back to OP's situation, you need to compare the certain interest rate of the student loans to other investments. The median tax bracket is 25%, so a 5% student loan with tax deductible interest has you paying 3.75% and the IRS sharing the burden of the other 1.25%. You have an after tax, guaranteed return of 3.75% by paying down your student loans. That's pretty good, but it's still your call if that's better than what you can do elsewhere. Bonds and CDs are running about 2%, so it beats those investments. The question is stocks, where the return is uncertain. For example, in 2015 the S&P 500 earned less than 1% according to Morningstar. It's too late to use that information now, just know that stock returns are uncertain.
Note that the student interest deduction seems to cut out at higher incomes, at which point you're stuck with the full 5% interest and no help from the IRS. For a guaranteed return, that's great. At 5% I'd certainly pay down the student loans, and at 3.75% you should probably pay down the student loans, but it's your call.
One other thing to consider, you can go bankrupt and have all your stock assets taken to pay it off. But your student loan will survive bankruptcy and even take away social security benefits if you ignore it that long. So student loan debt, being so toxic, should be paid down if you feel it's a tie between stocks and the student loan.