This information should be delivered, one on one, by somebody who is responsible for coaching that person in life. Good examples are a teacher, a boss or a parent (depending on the person's age). If you know one of those people in their life, talk to them about if they've noticed it and are willing to chat with them about it.
No matter who it comes from, it will be embarrassing. But they're more likely to take it in stride if it comes from the right person.
If you are that person, approach this the way you would want somebody to approach you, if you smelled bad. This conversation needs to not have any emotion, and take at most 30 seconds, unless they ask follow up questions. "Have you showered today and are you using deodorant? We need to work on your image." You don't need a 30 min drawn out discussion on it. That will make it worse and they'll resent you for it. Make it quick and painless.
You will probably need to bring it up multiple times (ex. the next week or the week after). Grooming is a habit and habits are hard to change. Imagine it was something like chewing on their nails. They're going to want to change, then forget about it and not think it's important. Help them succeed.