Welcome to the forum!
Activated charcoal can be ingested and is used to remove toxins and help poisoning victims, so it's not going to harm your birds when used in the manner you describe.
That said, I'm not sure how effective it will be when used that way. It will certainly bond to things in the air, but only if they come in contact with the charcoal.
Air purifiers that contain a charcoal medium accomplish this by using a fan to draw air through the filter, for example.
If the suspended bag can contain the charcoal while allowing air flow through it, it might help within the confines of the closet, but I would expect that to be the limits of its effectiveness (there's likely little air flow between a closed closet and the rest of your environment).
TL;DR -- it's safe to use in that way for your birds.