I don't think number of lonely people increases, they just become much more visible. Social networks and other changes in modern society make loneliness acceptable and people stop hiding it.
But if you eat junk food all the time, it's pretty obvious that one of the immediate consequences of eating junk food every day is the general decline of your health.
So it goes for social media. Social networks are the junk food of socializing. And don't get me started on what that does to someone's sense of self, well-being, norms, ethics, morality etc.
Maybe this picture will be illuminating to you[1]. It succinctly summarizes what I'm trying to say.
I should probably mention the image might be NSFW.
[1] http://artfucksme.com/wp-content/uploads/2014/12/controversi...