When there's Ganesha Chaturthi going on, people say that we shouldn't look at the moon on the day of immersion (visarjan) as its counted as a bad omen.
So why did he cursed the moon and why is that, we shouldn't look at the moon?
There are various version of this story but in all story Moon laughed at Lord Ganesha dn got cursed.
On the 4th day of the Bhadrapad month, Lord Ganesha was returning to his abode on his vehicle, the mouse. He had been fed well by his devotees. Seeing this sight of the huge Lord on a tiny mouse, the moon in the sky began to laugh aloud. He was vain about his splendor and beauty and thus he laughed. Little did he know that all his splendor was only a ‘reflection’ of the Sun God. In order to teach the vain moon a lesson, Lord Ganesha cursed that no light ever fall on him again. Thus, the moon had no light and disappeared from the skies.
The moon repented and sought pardon from Lord Ganesha. All the other beings of the world too pleaded on his behalf to Ganesha and the Lord acceded. However, once a curse is pronounced, it cannot be taken back, even by God. It can only be modified. Thus we are advised to be careful about our speech in everyday life. Lord Ganesha modified the curse and said that the moon would undergo regular waxing and waning to remind him to be humble. He also added that anyone seeing him on the 4th day (Chaturthi) of the Bhadrapada month would face blame and unjust criticism. (Source:hubpages.com)
This is the same story, I listened in Ganesh Chaturthi Katha. This same curse is responsible for Lord Krishna to be blamed for stealing a noble gem.