The concept of devil in Ramadan is quiet confusing some people says that in Ramadan the devils are captured and chained up and they give the reference of Prophet(pbuh) hadith. But the question arises if the devils are captured then why do people commit sins. So the answer to their question is that, the perception which different people have regarding the devils is not correct which is proved by the prophet(pbuh) hadith that the devils are not present in the holy month of Ramadan.
Al-Bukhaari (1899) and Muslim (1079) narrated from Abu Hurayrah (may Allaah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “When Ramadan comes, the gates of Paradise are opened, the gates of Hell are closed, and the devils are chained up.”
Al_Qurtabi define this hadith as during the holy month of Ramadan the evil actions are reduced on the part of those who fast meeting all the condition of fasting and taking care of all the requirements that been required by Ramadan or it can be understandable like only some of devil are chained up namely those who are stronger then the rest but not all of them as we can hear from the people that the evil are reduce in the month it is noticeable here that ewer 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):
That how can we settle the idea that the devils are chained up during the month but the fact is people are doing sin?
He answer to this question and said the fact that sin happen in Ramadan can not contradict that the devils are chained up in the month because the fact that they are chained up does not prevent them from moving, so according to prophet(pbuh) hadith “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).
So its mean that the evil are present in the month of Ramadan for those who do not fast as the conditions of fasting that’s why sin is done during the holy month.