The work of transforming your summer students into lifetime contributors begins on the first day. Actually, it begins even earlier with the preparation of your development community for student participation and inclusion. In as many ways as possible, you should aim to make the students full members of their community by the end of the program. Actively encourage students to attend community meetings and retreats. Highlight their work within your community. Part of being a mentor is being a cheerleader.
Say "thank you" often: People like to be thanked for their contributions—publicly and privately. Creating an environment of appreciation makes students want to keep contributing.
Be gentle with criticism: Remember that you are cultivating a long-time contributor. Positive, constructive comments are the most useful as well as the most pleasant to receive.
Don't airbrush your community: If you want a student to stick around, you might as well make the experience as realistic as possible. Creating a bubble for the student takes a lot of effort. When it inevitably bursts, they will be disillusioned.
Credit where due: Open source has something of a "reputation economy". Create a "CREDITS" file in your code repository dedicated to identifying those people who have contributed to your project, and make sure that they are mentioned by name in the release notes. As these contributions are credited, mention this publicly on a mailing list or in a blog post. Remember to also acknowledge contributions in public: when your student completes important project milestones, announce their successes to your development community.
Solicit talks at conferences: Recommend that students present their work at open source conferences. If you can, offer to co-present with them and help with designing their talks. If your organization can offer travel support for the student, this is quite helpful. If you know people who do work that your student is interested in, or that your student would be impressed to be introduced to, take the time to make introductions.
Professional development: If appropriate, offer written professional recommendations to students. Your help in career advice, job searches or referrals can be invaluable for a student.
Retreats and hackfests: If your organization is having a retreat or hosting a hackfest, invite your students along! Find ways of integrating them into your group the same way you would any other contributor.
Stay in contact: Open source organizations typically sustain themselves through the personal connections developers have to each other. Many contributors consider each other friends, and communicate non-technical information to each other. Remember though, that this is a student and GSoC is their job, so when in doubt err on the side of communicating professionally—no matter how informal the tone of your overall community.
Communicate early and communicate often! Try sending periodic emails to check in, pass on an interesting link or share a photo. Social networks can be useful for maintaining contact without a lot of overhead. Examples include: Identi.ca, Flickr, and GitHub. Use what works for you, and don't feel pressured to get involved with a social network. The telephone is also a valuabe resource; studies of open source communications have shown that VOIP technology is used with surprising frequency in open source projects, and it is a very personal and friendly form of communication.
Don't Be That Guy: Be socially and culturally sensitive. If you and your student don't share the same cultural background, ask respectful questions so you get to know about the similarities and differences a bit more. Also, make sure to maintain appropriate boundaries in your communications. For example, a student calling in the middle of the night to ask for relationship advice is not a pleasant situation for anyone; leave those conversations for their college friends.