It's a way to tell someone they need a working life or social life, or both.
It's a quick way of saying that without explaining exactly what they mean. They aren't saying to literally get a life, as that wouldn't make sense because everyone is alive, hence, they have a life they are living.
I'd rather they explain what they mean, but I guess get a life is a natural thing to say. It's not always designed to help, but sometimes to just shut the other person up. I believe it's called an ad hominem attack?