Yes, carrots are good for dogs but like most things, only in moderation.
Carrots contain natural sugars so if too many are consumed that would reverse the goodness. It's recommend one or two per week depending on the size of your dog, seek advice from your vet if you are unsure.
Older dogs with bad teeth may struggle with carrots but there are many other fruits or vegetable that have similar nutritional values.
If your dog is overweight, carrots are not the best choice because of the natural sugars so Cucumber or Zucchini would be a better replacement as they have lower calories.