They're necessary for the well-being of the horse. Most probably aren't bad for your horses. But they aren't necessarily good either. For example, some may contain compounds that can get a horse barred from competition if tested, such as in racing. How you give them their treats may cause more of a problem than the treats themselves.
Most treats are hand-fed.
This encourages the horses to nibble, which may result in biting the handler or even strangers who have some tasty treat. A friend bought a race horse that would tear a pocket off the handler's shirt or jeans to get at tobacco products. The horse's racetrack groom had fed it cigarettes as a treat. Giving a treat created a vice. Sugar cubes have long been used as treats for horses.