It feels great when someone notices that you have lost weight. I personally will only make a comment like that if I know the person well and if I know they are purposefully losing weight.
I used to work in a disability services office and too often clients had lost weight because of illness and I never wanted to be in the situation where I said "Hey you look great! Have you lost weight?" and the response I get is "Yes! Thanks for noticing! It's all the cancer I have now!"