I am supposing the use of the sling goes back to the neolithic or earlier. It kind makes sense for a region and has a lot of little stones lying around. And I can see where it could be useful in warfare when used by a skilled person against unarmored foes.
But, I would guess the bow/arrow would probably be more effective and damaging than a sling.
And, how effective could a sling be against an armored opponent? Even Persian light infantry had wicker shields and some kind of head gear that offered some protection. Greek armies were heavily armored. Roman soldiers were all armored with helmets and shield. Yet slings with lead shot was being used into the Roman period.
Why was this and how effective was the sling as a weapon?
And I can see where it could be useful in warfare when used by a skilled person against unarmored foes.
The sling is most effective against unarmoured opponents, and when used by a skilled user. But this is true of most weapons - armour is designed to stop weapons, and will do so against the most common weapons (if it doesn't, why bother with the expense and inconvenience/discomfort/weight?). Shields will typically stop arrows (many shields will be pierced by arrows, but will stop them reaching the wielder), most armour will stop swords, etc. The sling is not so special in being largely stopped by shields and armour.
Against unarmoured opponents, how effective is a sling? It has long range, and can outrange a bow (depending on the bow, the arrow, and the archer, and, of course, the slinger). A sling stone/bullet doesn't lose effectiveness with range as quickly as an arrow. Ammunition can be readily mass-produced (e.g., clay or lead bullets) or found for free (river pebbles), and is easy to store and more weather-resistant than arrows. A sling is easy to carry, and easier and cheaper to make than a bow. A sling is easier than a bow to use with a shield. A sling stone can fracture a skull, with multiple archaeological finds of skills with apparent sling stone fractures, and in one case (from Guam) with the stone still in place (some peoples who trepanned used trepanning mostly to treat skull fractures from sling stones). Archaeology says less about the effect of slings on soft tissue, but multiple ancient writers stated that bullets could penetrate flesh. Skov (2013) estimates a significant chance of serious injury (approximately 40%) for hits to an unprotected torso.
One disadvantage compared to bows, crossbows, and guns is that those weapons are easily aimed at point-blank range (just point the arrow/crossbow/gun straight at the enemy, and shoot), while the sling lacks this.
A sling stone/bullet will be less effective than an arrow shot from a high draw weight bow - both weapons can deliver their projectiles with about 100J of energy (depending on the weight of the stone/bullet, and speed - many stones/bullets would have had much less energy), and the arrow has the advantage of a sharp point for better penetration, and sometimes a broad cutting head for plenty of damage. But clearly from archaeology and textual sources, the sling is capable of doing useful damage in battle. If it works, and is cheap and convenient, why not use it?
Greek armies were heavily armored. Roman soldiers were all armored with helmets and shield. Yet slings with lead shot was being used into the Roman period.
Not all soldiers wear close-to-full armour. The best-armoured soldiers might more or less comfortably bounce sling stones (of normal weight) from their armour and shields, but other soldiers will suffer rather more. Again, helmets, shields, and body armour will typically stop arrows, but the bow continued in use despite the frequent use of armour on the battlefield.
(A staff sling used with heavy stones can easily deliver in excess of 200J. The staff sling has good potential to be dangerous to armoured opponents.)
References and reading:
Eric T. Skov, Experimentation in Sling Weaponry: Effectiveness of and Archaeological Implications for a World-Wide Primitive Technology, MA thesis, University of Nebraska-Lincoln (2013). https://digitalcommons.unl.edu/anthrotheses/30/
Robert York and Gigi York, Slings and Slingstones: The Forgotten Weapons of Oceania and the Americas, The Kent State University Press, 2011.