I think it's really sad that we - as a culture - think that nagging and shaming someone is a good, effective way to help them. It really isn't. A person knows how big (or not) they are, and I struggle to think of anyone who wouldn't know that "eat more vegetables, less sugar, and take a walk" is a good start.
So, we come to "why are they not doing this?" and you open a whole can of worms. Maybe the problem is physical. Maybe they are malnourished in terms of vitamins, so their body drives them to eat ANYTHING in an attempt to extract nutrition (I've noticed I'm prone to this). Maybe they are depressed, and think they are not worthy of good food and good health. Maybe they have so much going on that they have no time to cook or walk. Perhaps they are now in a state where moving and standing to cook causes physical pain.
I don't have an answer, but what I think I would do in a similar situation is:
Give the guy a break. Don't be another negative voice. Don't even mention it.
Offer to share healthy things, e.g. if you're seeing each other for lunch, or going on a nice stroll round the local park. But don't have this be the focus of any time you spend together. Do other stuff!
Perhaps - depending how close you are - find out if there is a hobby or a passion they want to do/try. Encourage that. Sounds like he has a rough home life, so any respite can only be a good thing. Maybe he'll decide later that he needs to change his lifestyle to be able to particpate fully in the hobby. Maybe he won't.
Remember he is his own responsibility. YOUR smart move for YOU might be working on accepting that. You could be a good friend, but you can't wave a magic wand. The consequences are not your responsibility.