When you enable your referral program, you'll be able to view who referred a customer.
There are two ways to do this:
1. From the customer profile. Head to Customers >> Customer list >> click customer >> referred by.
2. From the Referrals tab. If you need to check the referrals for multiple customers, the quickest way to do this is from Customers >> Referrals. Here you will be able to check who referred a customer, both for pending and confirmed referrals.