There is a Hadith mentioning that a person who dies whilst fasting enters paradise. This does mean we should see blessings in a person passing away whilst fasting. However, we are not permitted to say this individually is going to Jannah. Rather his judgment is with Allah Most High.
حَدَّثَنَا حَسَنٌ، وَعَفَّانُ، قَالَا: حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ عُثْمَانَ الْبَتِّيِّ، عَنْ نُعَيْمٍ ـ قَالَ عَفَّانُ فِي حَدِيثِهِ ـ ابْنِ أَبِي هِنْدٍ، عَنْ حُذَيْفَةَ قَالَ: أَسْنَدْتُ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ إِلَى صَدْرِي فَقَالَ: مَنْ قَالَ لَا إِلَهَ إِلَّا اللهُ ـ قَالَ حَسَنٌ: ابْتِغَاءَ وَجْهِ اللهِ ـ خُتِمَ لَهُ بِهَا دَخَلَ الْجَنَّةَ، وَمَنْ صَامَ يَوْمًا ابْتِغَاءَ وَجْهِ اللهِ خُتِمَ لَهُ بِهَا دَخَلَ الْجَنَّةَ، وَمَنْ تَصَدَّقَ بِصَدَقَةٍ ابْتِغَاءَ وَجْهِ اللهِ خُتِمَ لَهُ بِهَا دَخَلَ الْجَنَّةَ
The Prophet ﷺ said, ‘Whoever says there is no god other than Allah alone, sincerely seeking the pleasure of Allah (Most High), and he dies upon that, will enter paradise. Whoever fasts a day, sincerely seeking the pleasure of Allah (Most High), and he dies upon that, will enter paradise. Whoever gives Sadaqah (charity), sincerely seeking the pleasure of Allah (Most High), and he dies upon that, will enter paradise.’ (Ahmad 23324).
Who will or will not enter paradise is known to Allah Most High alone. We cannot comment upon it without evidence from Quran and Hadith. The norm with Quran and Hadith is to make generic statements and not specify individuals, as seen in the Hadith above. In such cases we cannot specify individuals. Thus, we cannot say such a person died whilst fasting, so he is going to Jannah. Rather we quote the Hadith and hope it applies to him.
However, when Quran and Hadith specify individuals for Heaven or Hell. Then we will specify too. For example, we will say Abu Lahab is going to Hell. We will say Sayidina Abu Bakr (May Allah Most High be pleased with him) is going to Heaven. This is because the Quran specifically mentions Abu Lahab is going to Hell. And Hadith specifically mentions Sayidina Abu Bakr (May Allah Most High be pleased with him) is going to Heaven.
Since the Hadith above is a generic statement, we can say anyone who dies whilst fasting will go to Jannah. But we cannot specify a particular Individual by saying, this person was fasting and passed away, so he is going to Jannah. However, we will see him dying whilst fasting as a blessing and we will hope (not confirm) that it leads him to Jannah.
الْمَرْأَة الَّتِي أثنت على عُثْمَان بن مَظْعُون بقولِهَا: شهادتي عَلَيْك أَبَا السَّائِب، فَقَالَ لَهَا: وَمَا يدْريك؟ وَقد يُجَاب عَنهُ: بِأَنَّهُ إِنَّمَا أنكر عَلَيْهَا الْقطع بِأَن الله أكْرمه، وَذَلِكَ مغيب عَنْهَا، بِخِلَاف الشَّهَادَة للْمَيت بأفعاله الجميلة الَّتِي كَانَ متلبسا بهَا فِي الْحَيَاة الدُّنْيَا. (عمدة القاري شرح صحيح البخاري)
(As for) the woman who praised Uthman bin Madhoon saying, my testimony for you O Aba al-Saib (is that Allah Most High has honoured you). He (The Prophet ﷺ) said to her, how do you know? This can be explained by saying, He ﷺ reproached her for it because of her saying definitively that Allah (Most High) has honoured him. And that is from the unseen. As opposed to (mentioning) the virtuous actions of the deceased that he used to be involved in during his worldly life. (Imam Badr al-Din al-Ayni, Umdatu al-Qari).
In the Nass (text) above, Imam al-Ayni is commenting upon a Hadith narration that has a Sahabi saying a particular Sahabi is going to Jannah. The blessed Prophet ﷺ rebukes her for making such a specific statement. He ﷺ makes it very clear that we cannot comment on a person’s state with Allah (Most High). Commenting on such matters is speaking of the Ghayb (unseen) without evidence, and is rebuked in the Hadith. Despite such clear explanations from classical scholars and abundant evidence from Quran and Hadith many Muslims persist in such errors. They will say such a person is going to Jannah. Not realising that this is not permitted. And not realising they are speaking about the Ghayb (unseen) without evidence.
Therefore, if a person passes away whilst fasting, we will see this as a blessing. However, we will not say he is going to Jannah. Matters that are known to Allah (Most High) alone, like inward piety, rank, and status with Allah (Most High) are from the Ghayb (unseen). Thus, we are not permitted to speak of them without clear evidence from Quran and Hadith.
And Allah Most High Knows Best.
-Answered by Shaykh Noorud-deen Rashid (30.04.2022)
Explanation of the Hadith About Praising the Dead