There are reasons some people have body odor, so I probably wouldn't tell them. I've gotten laser hair removal on the underarms and I know that on the days you do that, you're not allowed to wear deodorant, so you do end up smelling. I just got it done this week and needed to pick up something from the store and when I moved my arms I was rank and I was glad nobody said anything. Also, if someone has been doing physical labor then they're going to smell, but I do respect people who do physical labor as it's necessary for society. Also, if someone comes from the gym smelling bad, I know it's keeping them healthier, so I wouldn't say something about that.
I guess the only time I'd consider saying something is if you can tell that the person includes garlic and onions in every meal they eat.