The Sonic Batarang sent out a high-pitched wailing sound, which attracted any inmate in earshot. As they got close to it, 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
Again, 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 didn't appear in Batman: Arkham Knight, but it was replaced with a device with same usage: The Voice Synthesizer. While the Voice Synthesizer was eventually rendered useless if it's used too much in a single predator encounter, it could be used to trick henchmen to activate traps. For example, an electrified ammo crate, which was impossible with the Sonic Batarang.