The importance of having good references can hardly be overstated. Potential employers rely on them to gauge your accomplishments, professionalism and character. A reference from a friend can be just the lever your candidacy needs, so it's good to remember a few rules.
Leave Nothing to Chance
Choose a reference who can speak to your character. Your college drinking buddy may know you better than anyone, but what you need is someone who has an experience of you as reliable, principled, and hard-working. The reference can be an old teammate, lab partner, or fellow church member. The person you choose for your reference doesn't need to know everything about you, just enough to express confidence in your ability to do the job.
Speak to your friend beforehand, and to make sure he is comfortable with being your reference. Take the time to explain the responsibilities of the position for which you're applying, and go over the questions the recruiter is likely to ask. Additionally, make sure the recruiter will be calling your friend at an appropriate time of the day, especially if your friend lives in a different time zone.
Follow up afterwards, and use the conversation to plan your next step with your potential employer. Let your friend know how much you appreciated the effort. It's a big favor, and your pal deserves whatever you can think of to say thanks.