If the loans were for your education and you made the payments on them, then you can take the interest deduction if you are also legally obligated to pay it.
To claim a deduction you must be legally obligated to repay the loan and you must actually make the payments. In many cases the student, if a dependent, and the parents are both legally obligated to repay the loan. In such a case the deduction is allowable to whoever makes the payments.
Source of above paragraph: https://www.irs.com/articles/rules-deducting-student-loan-interest