No — your Sims are free to gain weight, and the game will happily let them.
Whether you want them to is another matter. Body shape can influence how other Sims react, and a Sim with a crush may be put off by a partner who has let themselves go. If you are playing for those relationship dynamics, keeping your Sims in shape is the safer bet.