Short answer
Great reward. The Prophet ﷺ said whoever builds a mosque for Allah's sake, Allah builds a house for him in Paradise, and scholars say those who help pay for it share in that reward by their intention. A mosque is also a lasting charity whose reward goes on while people pray in it. Give from sadaqah or lillah, not zakat.
Giving to build, run or maintain a mosque is mustahabb and a form of lasting charity (sadaqah jariyah). Zakat may not be used for it, because zakat must pass into the ownership of an eligible person.
The four schools agree on this.
Explanation
The Prophet ﷺ said that whoever builds a mosque seeking Allah's pleasure, Allah builds the like of it for him in Paradise. Most of us do not build a mosque alone, but scholars explain that everyone who pays towards it shares in the reward according to what they gave and how sincere they were. A small amount given sincerely is not small with Allah.
A mosque is also sadaqah jariyah, charity whose reward continues after death. Every prayer prayed in it, every class held there and every word of Quran recited under its roof may count for those who helped build and keep it. See sadaqah jariyah.
Your donation can go to anything the mosque needs: building and extensions, carpets and fittings, electricity and heating, cleaning, the imam's salary and its classes. All of these are paid from voluntary sadaqah or lillah. Zakat cannot be used for them, because zakat must be handed to poor people as their own; see can zakat be given to a mosque and what is lillah.
Give with a sincere intention and without seeking praise. The Quran describes those who maintain the mosques as people who believe in Allah and the Last Day, pray and pay zakat. The four schools agree that supporting mosques is a great good deed.
The evidence
Quran, Surah At-Tawba 9:18
إِنَّمَا يَعْمُرُ مَسَٰجِدَ ٱللَّهِ مَنْ ءَامَنَ بِٱللَّهِ وَٱلْيَوْمِ ٱلْءَاخِرِ وَأَقَامَ ٱلصَّلَوٰةَ وَءَاتَى ٱلزَّكَوٰةَ وَلَمْ يَخْشَ إِلَّا ٱللَّهَ ۖ فَعَسَىٰٓ أُو۟لَٰٓئِكَ أَن يَكُونُوا۟ مِنَ ٱلْمُهْتَدِينَ ﴿١٨﴾
The mosques of Allah are only to be maintained by those who believe in Allah and the Last Day and establish prayer and give zakah and do not fear except Allah, for it is expected that those will be of the [rightly] guided.
Maintaining mosques is a mark of true believers.
Sahih al-Bukhari 450
Sahih... من بنى مسجدا يبتغي به وجه الله بنى الله له مثله في الجنة ...
"Whoever builds a mosque seeking Allah's pleasure, Allah builds for him the like of it in Paradise."
The reward for building, or helping to build, a mosque.
Sahih Muslim 1631
Sahih... إذا مات الإنسان انقطع عنه عمله إلا من ثلاثة إلا من صدقة جارية ...
"When a person dies, his deeds are cut off except for three: an ongoing charity, ..."
A mosque is a clear example of an ongoing charity.
Where the ruling is recorded
- al-Hidaya, Kitab al-Zakat, chapter on those to whom zakat may and may not be paid. Zakat may not be used to build a mosque, as there is no transfer of ownership to a poor person.
- Radd al-Muhtar, Kitab al-Waqf, section on mosques. Spending on a mosque and its upkeep from waqf and voluntary donations.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.