Agreed with many people on here.
Never ever to a stranger.
If someone complains incessantly about their weight, I think it’s okay to speak up (gently).
If someone asks you for assistance, it’s of course, warranted to give your input.
Since your question relates to a significant other, I think it should be brought up if it is a problem for you provided it is done in a loving, respectful manner. I come from a variety that believes you should really love the person inside, but I realize that doesn’t always translate into physical attraction. There are many people who marry slim spouses and are not attracted to large people. I think you should try to maintain what you were physically at the time of marriage, while recognizing your metabolism/lifestyle is going to change, childbearing will alter your body, etc. Some flexibility is required, unless you’re planning to upgrade your spouse every 5–10 years… There should be some unspoken limits. (Telling your wife she could lose a few because she’s gone from a size 2 to a size 8 after four kids would NOT be okay in my book, nor would telling your husband you want him to hit the gym because he lost the 8 pack you married him with.)
I know someone who was in a relationship for 17? 18? years. Something like that. In that time, she gained 85 lbs. About 10 years into it, he explained the problem when she hit 200, that he was losing the attraction for her. She didn’t make any efforts at that time to lose weight and the remainder of the relationship was sexless. He wasn’t attracted to her, she felt rejected and medicated further with food. It wasn’t a good scenario.
The other instance in which you should address this with your spouse is when it is affecting their health. I have addressed my husband’s eating habits with him on numerous occasions having nothing to do with his size. (With a 29–30inch waist, I would be happy if he gained a few. It’s hard getting him to understand that chocolate is not a food group and a pound of steak with bread and cheese do not constitute a balanced meal.) If your spouse has health issues that lead to a debilitating illness that could have been prevented, they are then your problem. No one plans to be a burden on someone but reality is that it happens all the time. As much as someone can love their husband/wife, they want a partner, not a dependent.