Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says: The verse "Not equal are those of the believers who sit (at home)" [Surah al-Nisa: 95] concerns those who went out to Badr and those who did not. When the battle of Badr took place, Abdullah bin Jahsh al-Asadi and Abdullah bin Shurayh, or Shurayh bin Malik bin Rabi'ah bin Dibab (he is Ibn Umm Maktum (may Allah be pleased with him)), said: "O Messenger of Allah, we are blind; is there a concession for us?" So this verse was revealed: "Not equal are those of the believers who sit (at home)" "Allah has preferred those who strive with their wealth and their lives over those who sit (at home) by a degree" [Surah al-Nisa: 95], meaning: those of the believers who sit (at home) without an excuse are not equal to those who go out; Allah has preferred those who strive with their wealth and lives over those who sit (at home) by a degree. These are the ones who sit (at home) without any excuse: "Allah has preferred those who strive over those who sit (at home) with a great reward, degrees from Him" [Surah al-Nisa: 95-96], meaning Allah has preferred the strivers with a great reward over those who sit, those who sit (at home) without an excuse.
Imam al-Shafi'i (may Allah have mercy on him) says: It is clear that since Allah has promised good to those who sit (at home) without a disability, they are not sinful for staying behind. And Allah made it clear in His words about going forth, when He commanded going forth: "Go forth, light and heavy" [Surah al-Tawbah: 41], and He said: "If you do not go forth, He will punish you with a painful punishment" [Surah al-Tawbah: 39]. And He said: "It is not for the believers to go forth all together. Why should not a party from every group of them go forth?" [Surah al-Tawbah: 122]. Here Allah has made known that jihad is a communal obligation (fard kifayah), and made clear that if all of them stayed behind together, all of them would be sinful for staying behind, in the light of His words: "If you do not go forth, He will punish you with a painful punishment" [Surah al-Tawbah: 39].
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17936