I just see it as a rude way to tell someone they need a social life. At times it's used to help people, at other times it's used to make the person saying it feel better because they are insecure with their own problems.
It's too bad so many people don't like to choose their words more carefully, there are nicer ways of breaking to someone who lacks a social life that they need a social life.
It's situational too. Some people are okay with a tiny circle of friends, or even just one friend. To tell people like that to get a life is being ignorant toward the person they are telling it to because they don't understand that not everybody needs a lot of friends to be happy.
I guess it's just a short phrase that can be complicated.