Nabi Aadam alayhis salaam was the first person on earth to fast. He would fast on the 13, 14 &15th of each Islamic month. A benefit of this fast was that his complexion returned to the colour it was in Jannah.
The first nation to keep fast was the nation of King Thahoorat, who was the 30th ruler/king after Nabi Aadam alayhis salaam. His community was experiencing a drought, so he instructed the wealthy to keep fast during the day and feed an orphan each evening. The wealthy being hungry all day resulted in them having compassion for the poor. Simultaneously their Ibaadat of Allah Ta’aala was refreshed and their hospitality was demonstrated. -Tafseer Roohul Bayaan-
Nabi Dawood Alayhis Salaam used to keep fast every alternate day.
At first the Muslims used to keep fast on three days each month. When the Beloved Nabi sallAllahu alayhi wasallam came to Madinah, it was noticed that the Jews fasted for Ashura (10th Muhurram). The Holy Prophet sallAllahu alayhi wasallam said that we have a greater right over Nabi Moosa alayhis salaam than the Jews do. So we should fast on Ashura. -Bukhari- From then on the Nabi sallAllahu ayhi wasallam and the Ashaab radi Allahu anhum kept fast three days in a month and the fast of Ashura.
During 3 AH the Ayat of Shahru Ramadhaanal Ladhee … was revealed. This Ayat made fasting in the month of Ramadhaan compulsory and the other fasts were made optional (Nafl). The fast of Ashura was to be accompanied with a fast the day before or after.
Hadrath ibn Abbaas radi Allahu anhuma explains that fasting during Ramadhaan was also prescribed for the Jews. However when Ramadhaan occured in summer they deferred fasting to another season. As a compensation, they fasted an extra twenty days. -Tafseer Ibn Jareer-
Further to this they made several other changes to their fasting. They fast for forty to fifty days and only abstain from certain foods, as opposed to abstaining from all food, drink and intimacy and they no more keep their fast during the month of Ramadhaan. This is yet another way in which they have moved away from the original Deen.
Initially, a Muslim’s fast commenced once he fell asleep, and not from Sehri, just before Fajr. Once Sahabi Qais bin Sarma radi Allahu Anhu worked until late whilst fasting. He came home, prayed Esha and slept, without eating anything. This meant that his next fast had already commenced.
The next day RasoolAllah sallAllahu alayhi wasallam saw him appearing distressed and in pain. Nabi sallAllahu alayhi wasallam asked him why he was looking so distressed. He explained he fasted all day whilst working, came home and fell asleep without eating. And this made his next fast begin without him eating anything. Thereafter Allah Ta’aala changed the times of fasting, to commence at dawn and end at dusk. -Tafseer Ibn Jareer, Durre Mansoor-