I'd agree with not befriending existing pupils on Facebook, although the 'class page' mentioned earlier sounds like a good idea. I have a very small number of contacts on Facebook, but one of the benefits is that I am now in touch with an ex-pupil (of 15 years ago) and it is pleasant to follow her progress.
Contact outside school is slightly different. It was axiomatic not to live in the intake area of a school you taught in, but I was an athletics coach locally and also ran the school team. Several pupils, therefore, were in contact with me on a more informal 'out of school' basis when they joined the club, trained in the evenings/weekends and went to compete in league matches etc.. I experienced no problems through this.