Allah – the Most High – said: "The month of Ramadaan in which the Qur’aan was revealed, a guidance for mankind and clear proofs for the guidance of the Criterion between right and wrong. So whosoever of you sights the crescent for the month of Ramadaan, he must fast that month." [Soorah al-Baqarah 2:185]
Allah’s Messenger, sallallahu `alayhi wa sallam, said: "Islaam is built upon five: Testifying that none has the right to be worshipped except Allah and that Muhammad is the Messenger of Allah, establishing the Prayer, giving the Zakaah, performing Hajj to the House, and fasting in Ramadaan." He sallallahu `alayhi wa sallam said: "There has come to you Ramadaan, a blessed month, in which Allah has made it obligatory to fast. During it the gates of Paradise are opened and the gates of Hellfire are closed, and the rebellious devils are chained. In it is a night (Laylatul-Qadr) which is better than a thousand months. He who is deprived of its good truly has been deprived."
From the many important lessons to be learnt from fasting are:
[1] Gaining Taqwaa 
[2] Seeking Nearness to Allah
[3] Acquiring Patience
[4] Cultivating Good Manners
[5] Sensing Muslim Unity
Read more about them in the comments and more about Ramadan by pressing the ubove link>>