Hypothyroidism can cause weight gain, while hyperthyroidism can lead to weight loss or difficulty in gaining weight.