Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.127C.

Section : On Seeing the Moon.

‘Abdallah b.’Umar reported that when the Prophet, peace be upon him, saw moon he would say, “Allah is the Greatest! O Allah, make it shine upon us in peace, faith, security, safety, and with the power to do what You love and are pleased with! O moon! Your Lord and our Lord is Allah.” (At-Tabarani)

Qatadah reported that when the Prophet, peace be upon him, saw the moon, he would say, “You are the new moon of goodness and guidance, the new moon of goodness and guidance. I believe in Allah Who created you.” He said this three times. And then he would add, “Praise be to Allah Who caused such and such month to go by in this manner and brought another month (which he named).” This is reported by Abu Daw ‘ud.