Praise be to Allah
With regard to the supplication mentioned in the question, it is proven to be from the Prophet (blessings and peace of Allah be upon him), as was mentioned by some of the scholars.
It was narrated that Abaan ibn ‘Uthmaan (may Allah be pleased with him) said, narrating from ‘Uthmaan ibn ‘Affaan who said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: “Whoever says ‘Bismillah illadhi la yadurru ma’a ismihi shay’un fi’l-ard wa la fi’l-sama’ wa huwa al-samee’ ul-‘aleem (In the name of Allah with Whose name nothing can harm on earth or in heaven, and He is the All-Hearing, All-Knowing)’, three times, will not be stricken with a sudden affliction until morning comes, and whoever says them when morning comes will not be stricken with a sudden affliction until evening comes.”
He said: Abaan ibn ‘Uthmaan was afflicted with paralysis and the man who had heard this hadith from him started looking at him. He said to him: Why are you looking at me? By Allah, I did not tell a lie about ‘Uthmaan and ‘Uthmaan did not tell a lie about the Prophet (blessings and peace of Allah be upon him). But the day which that (paralysis) befell me, I got angry and forgot to say them.
Narrated by Abu Dawood (5088). It was also narrated by at-Tirmidhi in his Sunan (no. 3388) as follows:
“There is no one who says in the morning of every day and the evening of every night ‘Bismillah illadhi la yadurru ma’a ismihi shay’un fi’l-ard wa la fi’l-sama’ wa huwa al-samee’ ul-‘aleem (In the name of Allah with Whose name nothing can harm on earth or in heaven, and He is the All-Hearing, All-Knowing)’, three times but nothing will harm him.”
At-Tirmidhi said: It is hasan saheeh ghareeb. It was classed as saheeh by Ibn al-Qayyim in Zaad al-Ma‘aad (2/338) and by al-Albaani in Saheeh Abi Dawood.
Dr ‘Abd ar-Razzaaq al-Badr said:
This is one of the great adhkaar that the Muslim should recite every morning and evening, so that he may be protected thereby, by Allah’s leave, against being struck by a sudden calamity or disastrous harm or the like. Al-Qurtubi (may Allah have mercy on him) said concerning this hadith: This is a saheeh report and true words that have been proven to us by experience. Ever since I heard it I acted upon it, and nothing harmed me until I omitted to do it. A scorpion stung me in Madinah one night, and when I thought about it I realised that I had forgotten to seek refuge with Allah by reciting these words.
See: al-Futoohaat ar-Rabbaanyyah by Ibn ‘Allaan (3/100).
The Sunnah with regard to this dhikr is to say it three times every morning and evening, as the Prophet (blessings and peace of Allah be upon him) taught.
The words “illadhi la yadurru ma‘a ismihi shay’un fi’l-ard wa la fi’l-sama’ (with Whose name nothing can harm on earth or in heaven)”mean: whoever seeks refuge in the name of Allah, no calamity can harm him from the direction of the earth or from the direction of heaven.
And the words “wa huwa al-samee‘ ul-‘aleem (and He is the All-Hearing, All-Knowing)” mean: He hears all that people say and knows all their deeds, none of which are hidden from Him on earth or in heaven.
It is proven in Saheeh Muslim that Abu Hurayrah (may Allah be pleased with him) said:
A man came to the Prophet (blessings and peace of Allah be upon him) and said: O Messenger of Allah, I was stung by a scorpion last night. He said: “If you had said, when evening came, ‘A’oodhu bi kalimaat Allaah al-taammah min sharri ma khalaq (I seek refuge in the perfect words of Allah from the evil of that which He has created)’, it would not have harmed you.”
Narrated by Muslim (2709).
According to a report narrated by at-Tirmidhi: “Whoever says three times when evening comes, ‘A’oodhu bi kalimaat Allaah al-taammah min sharri ma khalaq (I seek refuge in the perfect words of Allah from the evil of that which He has created)’, no fever will harm him that night.” No. 3604.
The word translated here as fever refers to a sting from any poisonous creature such as a scorpion and the like.
Following this hadith, at-Tirmidhi narrated from Suhayl ibn Abi Saalih – one of the narrators – that he said:
Our family used to learn it, and they used to say it every night. One of their young girls was stung, and she did not feel any pain as a result.
This hadith is indicative of the virtue of this supplication, and indicates that whoever says it when evening comes will be protected, by Allah’s leave, from anything that may harm him such as a snake bite or scorpion sting and the like. End quote.
Fiqh al-Ad‘iyah wa’l-Adhkaar (3/12-14).
Another of the adhkaar that offer protection against evil and ward off harm, by Allah’s leave, is that which was narrated by ‘Abdullah ibn Khubayb (may Allah be pleased with him) who said: We went out on a rainy and very dark night, looking for the Messenger of Allah (blessings and peace of Allah be upon him) to lead us in prayer, and we found him. He said: “Say,” but I did not say anything. Then he said: “Say,” but I did not say anything. Then he said: “Say,” and I said: What should I say, O Messenger of Allah? He said: “Say: Qul huwa Allaahu Ahad and al-Mu’awwidhatayn, in the evening and in the morning, three times, and they will suffice you against all things.”
Narrated by Abu Dawood (5082) and by at-Tirmidhi (3575), who said: It is hasan saheeh ghareeb. An-Nawawi said in al-Adhkaar (p. 107): Its isnaad is saheeh.
To sum up:
The du‘aa’s and adhkaar mentioned above will protect the Muslim from harms and evils of all kinds, by Allah’s leave, but that is not necessarily so. If a person is affected by harm despite regularly reciting these adhkaar, then that is by the decree of Allah, may He be exalted, and there is great wisdom in what He commands and decrees. Allah, may He be exalted, says (interpretation of the meaning):
“For each (person), there are angels in succession, before and behind him. They guard him by the Command of Allah”
‘Ikrimah narrated from Ibn ‘Abbaas that he said: “They guard him by the Command of Allah” – this refers to angels who protect him from in front and from behind, but when the decree of Allah comes, they step back.
Mujaahid said: There is no person who does not have an angel appointed over him, to protect him whilst he sleeps and when he is awake from the jinn, humans and vermin, so none of them come towards him, intending him ill, but the angel says: Get back – except for something that Allah decrees is to reach him, then it befalls him.
Tafseer Ibn Katheer (4/438).
With regard to reciting this supplication on behalf of family members, that is not valid and does not suffice them, as there is no report to indicate that it is valid to recite adhkaar on behalf of the living. So each Muslim should be keen to do that which will benefit him, and ensure that he is not one of those who are heedless of the remembrance of Allah, may He be glorified and exalted.
Allah, may He be exalted, says (interpretation of the meaning):
“And remember your Lord by your tongue and within yourself, humbly and with fear without loudness in words in the mornings, and in the afternoons and be not of those who are neglectful.
Surely, those who are with your Lord (angels) are never too proud to perform acts of worship to Him, but they glorify His Praise and prostrate before Him”
With regard to the story of the houses around the house of Abu’d-Darda’ (may Allah be pleased with him) burning down whilst his house remained safe, it was not narrated concerning the dhikr mentioned in the question – “Bismillah illadhi la yadurru ma’a ismihi shay’un fi’l-ard wa la fi’l-sama’ wa huwa al-samee’ ul-‘aleem (In the name of Allah with Whose name nothing can harm on earth or in heaven, and He is the All-Hearing, All-Knowing)”. Rather it was narrated concerning another du‘aa’:
It was narrated that Talq ibn Habeeb said:
A man came to Abu’d-Darda’ (may Allah be pleased with him) and said: O Abu’d-Darda’, your house is on fire. He said: It is not on fire; Allah, may He be glorified and exalted, would not do that, because of some words that I heard from the Messenger of Allah (blessings and peace of Allah be upon him) – whoever says them at the beginning of the day, no calamity will befall him until evening comes, and whoever says them at the end of the day, no calamity will befall him until morning comes: “Allahumma anta Rabbiy, laa ilaaha illa anta, ‘alayka tawakkaltu, wa anta Rabb ul-‘arsh il-‘azeem; ma sha’ Allahu kaana wa ma lam yasha’ lam yakun; laa hawla wa laa quwwata illa Billah il-‘Aliy il-‘Azeem. A‘lamu anna Allaha ‘ala kulli shay’in qadeer, wa anna Allaha qad ahata bi kulli shay’in ‘ilman. Allahumma inni a‘oodhu bika min sharri nafsi wa min sharri kulli daabbatin anta aakhidun bi naasiyatiha; inna Rabbiy ‘ala siraatin mustaqeem (O Allah, You are my Lord, there is no god but You, in You I put my trust, and You are Lord of the mighty Throne. Whatever Allah wills happens, and whatever Allah does not will does not happen. There is no power and no strength except with Allah, the Most High, the Most Great. I know that Allah has power to do all things and that Allah has encompassed all things by His knowledge. O Allah, I seek refuge with You from the evil of my own self, and the evil of every creature that You hold by its forelock. Verily my Lord is on a straight path).
Narrated by Ibn as-Sunni in ‘Amal al-Yawm wa’l-Layla (no. 57); at-Tabaraani in ad-Du‘aa’ (no. 343); al-Bayhaqi in Dalaa’il an-Nubuwwah (7/121), via al-Aghlab ibn Tameem: al-Hajjaaj ibn Furaafisah told us, from Talq ibn Habeeb.
Ibn al-Jawzi (may Allah have mercy on him) said:
This is a hadith that is not proven, the problem is with al-Aghlab. Yahya ibn Ma‘een said: He is nothing. Al-Bukhaari said: He is munkar al-hadith (i.e., his hadith is to be rejected). End quote.
Al-‘Ilal al-Mutanaahiyah (2/352)
It was classed as da‘eef by al-Haafiz Ibn Hajar in Nataa’ij al-Afkaar (2/401)
Shaykh al-Albaani (may Allah have mercy on him) said:
This isnaad is da ‘eef jiddan (very weak). Concerning this al-Aghlab, al-Bukhaari and others said: He is munkar al-hadith (i.e., his hadith is to be rejected). al-Hajjaaj ibn Furaafisah is somewhat weak. End quote.
As-Silsilah ad-Da‘eefah (no. 6420)
And Allah knows best.