You could complement her on all the weight she lost, but you might not know that she’s suffering from major depression. It’s not uncommon for a depressed person to lose twenty pounds in a matter of weeks.
You could complement him on the muscle he gained, but you’d also be reinforcing the harmful stereotype that to be a man is to look a certain way. What happens as he ages and inevitably starts losing muscle?
It’s probably best to avoid commenting on how someone looks altogether. A better question might be, “how are you doing today?” Then listen.
Maybe then, over time, the person will want to talk about how she looks. Maybe much more.