Supplication when going to the mosque
O Allah, place within my heart light and upon my tongue light and within my ears light, and within my eyes light, and place behind me light and in front of me light and above me light and beneath me light. O Allah bestow upon me light.
Upon entering the mosque
I take refuge with Allah the Supreme and with HIs noble face, and HIs eternal authority from the accursed devil. In the name of Allah, and prayers and peace be upon the Messenger of Allah. O Allah open the gates of Your mercy for me.
Upon leaving the mosque
In the name of Allah, and prayers and peace be upon the Messenger of Allah. O Allah I ask You for Your favour. O Allah guard me from the accursed devil.
-extracted from the book: Fortification of the Muslim thru remembrance and supplication from the Qur'an and the sunnah by Sa'eed ben Ali wahf Al Qahtaani, translated by ismael ibraheem.