I heard the imam mention that the shaytan is not present in the month of Ramadhan. If this is true why is it hard for a muslim to stay away from sins during the month of ramadan even if the muslim is performing his or her regular duties.
The idea that the devils are not present in Ramadaan is not correct. What is proven from the Prophet (peace and blessings of Allaah be upon him) is that the devils are chained up during Ramadaan.
Al-Bukhaari (1899) and Muslim (1079) narrated from Abu Hurayrah (may Allaah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “When Ramadaan comes, the gates of Paradise are opened, the gates of Hell are closed, and the devils are chained up.”
See question no. 39736.
If it is said, How come we see many evil actions and sins happening in Ramadaan? If the devils are chained up that would not happen.
The answer is that evil actions are reduced on the part of those who fast meeting all the conditions of fasting and taking care to observe the proper etiquette; or that only some of the devils are chained up, namely the maarids (strong ones), and not all of them, as it says in some reports; or that evils are reduced in this month, which is something noticeable – fewer evils happen in this month than in others. If all of them were to be chained up that does not mean that evil and sin would not happen, because there are other causes of evil apart from the devils, such as evil souls, bad habits and human devils.
From Fath al-Baari.
Shaykh Ibn ‘Uthaymeen was asked in Fataawa al-Siyaam (p. 466):
How can we reconcile between the idea that the devils are chained up in Ramadaan and the fact the people commit sin?
The fact that sin happens in Ramadaan does not contradict the report that the devils are chained up in Ramadaan, because the fact that they are chained up does not prevent them from moving. Hence it says in the hadeeth: “And the strong devils are chained up, and they cannot achieve what they usually achieve (at other times).” Narrated by Ahmad, 7857; this hadeeth was mentioned by al-Albaani in Da’eef al-Targheeb, 586; he said: it is da’eef jiddan (very weak).
It does not mean that the devils do not move at all, rather they can move and lead people astray, but their activities during Ramadaan are not like their activities at other times.