Fasting during the month of Ramadan is one of the five pillars of Islam, which is of paramount significance. Fasting requires abstaining from food, drink, and sexual intercourse from dawn until sunset. The Prophet (peace and blessings be upon him) said, “Islam is built upon five pillars: testifying that there is no god except Allah and that Muhammad is the Messenger of Allah, performing Prayer, paying the zakah, making the pilgrimage to the Sacred House (Hajj), and fasting the month of Ramadan.” (Reported by Al-Bukhari and Muslim)
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: As a muslim that’s fasting, if you need to inject insulin, then you belong to the category of people who are exempt from fasting, so you should not fast. It is not at all considered an act of piety to fast while one is suffering from the type of diabetes that requires insulin injection during the day.

It should be a source of comfort for you to know that the Prophet (peace and blessings be upon him) said, “Allah loves His servants to make use of His concessions even as He loves them to carry out His strict orders.” In Surat Al-Baqarah, after enjoining fasting and then exempting those who are sick and on journey from the duty of fasting, Allah says, (Allah desires for you ease; He desires not hardship for you.) (Al-Baqarah: 185) Furthermore, we are ordered not to commit acts that may endanger our life; so stick to the path of moderation and skip fasting while you are sick and make up for it later if you can. Otherwise, you simply offer fidyah, which involves feeding a poor person for each day of fast you have missed.