All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is Allah Himself Who specified the beneficiaries of Zakaah who are eight categories; Allah Says (what means): {As-Sadaqaat (Zakaat) are only for the poor, and for the needy, and for those employed to collect (the funds); and for attracting the hearts of those who have been inclined (towards Islam); and to free the captives; and for those in debt; and for Allah's Cause (i.e. for those fighting in the holy wars), and for the wayfarer (a traveler who is cut off from everything); a duty imposed by Allah. And Allah is All-Knower, All-Wise.} [Quran 9:60]
Therefore, it is not permissible to give Zakaah to other than these eight categories that are specified in the verse as Allah is the All-Aware and He knows the need of his servants and their advantages.
As regards mosques and schools they should be built from other funds of Muslims. However, if there is nobody in charge of building mosques and there is no place where Muslims could perform the congregational prayer, the Friday prayer and the ‘Eed prayer, then, in this case, it is permissible to build from Zakaah money a mosque or rent a place where Muslims could perform their rituals. This is because there is a preponderant advantage in doing so, as this leads to unifying the Muslims, showing the rituals of Islam, performing the Friday prayer, the congregational prayer, and the ‘Eed prayer as well as propagating Islam and teaching it. So, this is included in the general meaning of the verse in which Allah Says (what means): {…and for Allah’s Cause.}
Allah knows best.