In today's world fasting is very popular and everyone is doing it. Why? Some people fast because they want to lose weight others fast because it has a spiritual meaning. Daniel fasted to give priority to prayer.
The Book of Daniel is to bring hope in the midst of your going through, fiery trials, bondage, pit seasons or loneliness. GODs purpose for Daniel's life was to exhort Israel to be faithful to GOD in trying times. This book of the Bible is regarding the latter days and filled with end time prophecies. NKJV Study Bible Holman
Daniel teaches us how to remain faithful knowing that our GOD has the last say. In Lamentations 3:37-38 Who can speak and have it happen if the Lord has not decreed it?
Is it not from the mouth of the Most High that both calamities and good things come?
And if my GOD has my best interest at heart I know that He will cover and keep me.
Daniel faced many pit seasons and one in particular he was thrown in a lion's den. Many are familiar with the story. The reason he was charged and thrown into a lion's den was because of his prayer life and faithfulness to GOD. He prayed three times a day. So when an edict went out that the people must worship the king at the sound of the music, Daniel did not worship the king but was found praying to the GOD Almighty as he did before, before the edict was proclaimed. Daniel already had a prayer life so he was confident in the Lord that GOD would deliver him.
Sometimes we need to have an "as we did before" so when the enemy comes the relationship with GOD is already established and all we have to do is ask GOD for it.
This book teaches us how to draw closer to GOD through fasting and praying. Fasting teaches us to deny ourselves of fleshly desires to be able to commune with GOD.