All pictures, paintings and idols of Lord Shiva are depicted with a crescent shaped moon (Chandra) on His head. An interesting incident led to Lord Shiva wearing the moon on his head. Daksha, the master of civilization, had married twenty seven of his daughters – the Nakshatras, lunar asterisms, to moon-god, Chandra. But Chandra ignored the 26 Nakshatrams and was enamored by only one among them the beautiful Rohini.
The other daughters complained to Daksha about Chandra’s partisan behavior and this angered Daskha who cursed Chandra that your body of which you are so proud will fade away.
Soon the body of Chandra started fading away and he approached Lord Vishnu who directed him to Lord Shiva who is the supreme physician and the keeper of the sacred herb Soma.

Thus the curse of Daksha causes the moon to wane and Lord Shiva rejuvenates him to wax again.
As Shiva carries Chandra on his head he is also known as Somnath.
As Shiva carries Chandra on his head he is also known as Somnath.
You may also like to read