There was a thoughtful article in the New Yorker about this: Friend Game: Behind the online hoax that led to a girl's suicide.