I'm with the posters who believe the "lucky you are thin" commenters were out of line.
I do not believe it would be rude for the SIL to, in response, explain exactly what she does to stay thin. It is not a judgment on anyone else; it is a statement of fact that "luck" has nothing to do with it and hard work and discipline, at least for the SIL, does.
That said, as evidenced by some of the comments on this thread, anything weight related or any statement that a person has some control over her weight seems to offend some people, even when no offense is intended and certainly would not be universally assumed.
I believe that if a person comments on another's body, it is not rude to correct any incorrect assumptions made by the commenter.