As others have said, they're used for a leg-deadened horse. They can also be used to give more precise aids where a touch in one area means one thing, and a touch in another area means another thing. This is more for an experienced rider with a steady leg. They should never been used as a punishment, or to make a horse go faster, only worn when and if they're needed.
There’s a time and place to use spurs, and correctly used as well as used for the right reasons, I personally don’t feel that they’re bad. However, they are to be used in moderation and really shouldn’t be relied upon nor used as a form of punishment per say.
I agree with @cecebear13 I also have a horse that’s alittle green, and if not ridden in spurs (I use the softest spurs though) he doesn’t respond to just leg. He needs some extra push, especially when jumping. Though in flat work I try not to use spurs, but that’s just me.
I think if a horse needs them then use them, but properly of course. I ride a hot horse that needs a bit more support to be put together, so I ride in nubby spurs. I don’t think people should ride in spurs if they don’t ride correctly in them though (e.g. constantly spurring the horse, constantly rubbing the horse, etc.). They should be used as a second aid if your horse does not respond to your leg the first time, not as a constant aid.