A lot of pshycologists make that claim but I haven't found any compelling studies that prove it. Depression and axiety is understandable because we're social animals but the physical aspect isn't convincing unless the socially isolated person is lying around in bed doing drugs and eating unhealthy food all day. In that case instead of loneliness, we should blame drug abuse. It's unclear whether drug use is causing social isolation or if the latter is causing drug use.
All the studies I've seen so far have weak evidence and most of them don't address confounding factors. I'm no scientist but I'd appreciate if someone could point to studies with strong evidence about this claim.