In fact, Islam establishes zakah to act as a sign of social solidarity between the members of the Ummah, a token of gratitude to Allah, and a means of purifying the self from its greedy desire for money and wealth. Muslims can also give sadaqah (voluntary charity) to gain even more merits and reward. By doing so they show their love for their fellow Muslims, care for their kith and kin, and have a sense of belonging to the tapestry of the Muslim society.
Dr. Rif`at Fawzi, former professor of Shari`ah at Cairo University, states: If the money given to that person [by the prison authorities] does not suffice them, then we are permitted to give them some money from the zakah money. We can give up to what suffices their needs. This is the maximum that we give them what suffices their needs. However, we cannot give them money to be used in things that are unlawful. So, for example, we cannot buy them cigarettes and stuff like that. We can give them money only that suffices their needs and makes their life easier.
Moreover, Sheikh Ahmad Kutty, a senior lecturer and Islamic Scholar at the Islamic Institute of Toronto, Ontario, Canada, adds:
If this person does not have the sufficient means to support himself or his family (while he is in jail), you are certainly allowed to give him from the zakah. While giving him, you should not give more than the amount necessary for maintaining a satisfactory standard of living as determined by the standards of the society you are living in.