Yes, you can bring back the money you lent earlier to a friend in India.
You can use two options, one is to send the money with a loan agreement & other is without the loan agreement.
In case of loan agreement, US taxes on the interest will be applicable even if there is no interest received.
When you do not have the loan documents, the re-pay amount received from your friend in India will be treated as gift to you. You may be subjected to pay gift tax in the US.
Discuss with your tax advisor or consult a CPA or tax attorney for any tax related questions.
You may also want to refer to - Lending Money to Family or Friends Overseas?