All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
The precise answer to this question depends on knowing the nature of this work with such an organization. Some kinds of work could be protecting the inmates like feeding them and admonishing them and other permissible work that is required in Islam. But some other work could be otherwise. Therefore, if the work in this institution is from the first type then that is permissible. However, if the work is from the second type, then it has to be looked at. What is permissible in its nature and does not involve helping in wronging and being unjust to anyone, then there is no harm in it. But if the type of work is in its nature not permissible like serving intoxicants, pork, cigarettes and the like, or that it leads to being unjust to anyone or helping in being unjust, then that is not permissible.
There is no difference in this regard between prisons and other institutions in
Allaah knows best.