The Sonic Batarang sent out a high-pitched wailing sound, which attracted any inmate in earshot. As they got close, the Sonic Batarang could be detonated to incapacitate the inmate, provided that you upgraded them to the Sonic Shock Batarang. However, doing this creates interference that prevents any more Sonic Batarangs from being used for the remainder of the map.
If the Sonic Batarang was left only to attract potential targets and not used to shock them, a henchman would either step on it or shoot it.
Arkham Origins Incident
The Sonic Batarang functioned the same way that it did in Arkham Asylum and Arkham City.
Arkham Asylum Incident
In Batman: Arkham Asylum, Batman could use the Sonic Batarang to lure armed inmates and take them down. It could also be upgraded to the Sonic Shock Batarang that could wipe out the armed inmates.
Arkham City Incident
In Batman: Arkham City, Batman could use the same version of the Sonic Batarang that was seen in Arkham Asylum.
Arkham Knight Incident
The Sonic Batarang was replaced with the Voice Synthesizer in Batman: Arkham Knight. While the Voice Synthesizer was eventually rendered useless if it was used too much in a single Predator encounter, it could be used to trick henchmen to activate traps.