Question: Lightning, according to Shari'a what function? Throwing the devil?
Answered by al-Ustadz Abu 'Abdillah Muhammad al-as-Sarbini Makassari
Which serves to throw the devil is the star dropped by Allah Subhanahu wa Ta'ala. This is one of the functions of the creation of the stars in the sky, as foretold by Allah Subhanahu wa Ta'ala in the Qur'an.
function thunder and lightning, as we answer nukilkan statement Shaykh
al-Islam Ibn Taymiyyah in Majmoo 'al-Fataawa (24/263-264), "The thunder
and lightning, the information contained in the hadith marfu' (resting
as the Prophet sallallaahu 'alaihi wasallam )
is narrated in the book Sunan at-Tirmidhi and others, the Prophet
sallallaahu 'alaihi wasallam was asked about ar-Ra'd (thunder). He sallallaahu 'alaihi wasallam said:
of God's angels assigned to manage the affairs of the clouds in his
hand tools (whip)  of the fire for drives along the clouds according
to the will of God." 
In the book Makarrim al-Akhlaq al-Kharaithi work, there atsar of Ali radi 'anhu:
asked about the lightning, so he replied, "Angel." He asked again about
flash, he replied, "whip-whip in the hands of the angels." In another
narration he said, "whip-whip of iron in the hands of angels."
It has been reported also atsar-atsar that convey with this.
other information has been narrated from some of the Salaf were not
menyelisihi above statement, as saying most of them, "Verily lightning
is (voice) collision substances (substances) cloud due to the air
pressure in the cloud." This information is not contradiction
with the statement above because ar-Ra'd (lightning / thunder) is
mashdar of ra'ada (meaning that it has berguruh), yar'udu (that are /
will berguruh), ra'dan (meaning thunder / lightning).
ar-ra'id (meaning that berguruh) called ra'dan (lightning / thunder),
seperth as al'adil (meaning fair) called 'Adlan (meaning fair).
Movement there requires discharge sound, while the angels move (paraded) clouds. They move from one place to another. The whole movement that occurred in the upper and lower nature, which are set angels. The
human voice was sourced from impact other members of the body, namely
the two lips, tongue, teeth, uvula (uvula) and the throat. Along with that, the man attributed with that he glorify his Lord, ordered to the good and forbid from munkar. If so, is the sound of thunder clouds rebuke. 
Similarly, the lightning. It
has been said, "(Flash's) water sparkle or gleam of fire." It also does
not deny (deny) that it's lightning whip in the hands of angels, as
fire sparkling in the hands of the angels like a whip, like a drover
rain. Angels lead (paraded) clouds such as animal herding horse riders. "
 See the explanation of meaning makhariq (whips tools) in an-Nihayah fi Gharib al-Athir Ibn Atsar work.
 After that, he was asked again about the sound of thunder is heard that. He sallallaahu 'alaihi wasallam said:
"Hardikannya the clouds when he rebuked (for the parade) to stop where he commands."
is the hadeeth of Ibn Abbas radi 'anhuma with a history of at-Tirmidhi
(the Book of Tafsir al-Qur'an, Chapter Wa min Surah ar-Ra'd no. 3117)
about the arrival of a group of Jews to the Prophet sallallaahu' alaihi
wasallam and ask about lightning . This hadith is also narrated by Ahmad, ath-Thabarani, adh-Dhiya 'al-Maqdisi, and other lafadz:
A group of Jews to the Prophet sallallaahu 'alaihi wasallam and said, "O Abul Qasim, we will ask you about some things. If you answer it, we will follow you, and believe in you ... membenarkanmu Tell us about lightning, is it? "
Prophet sallallaahu 'alaihi wasallam said, "Lightning is one of God's
angels angels of God who was assigned to take care of the cloud,
(hands-on or hands-no whip of fire to rebuke the cloud), and the sound
is heard from them is the cloud if it hardikannya at him to stop where he commands. "
Which in parentheses are additional lafadz of adh-Dhiya 'in one's history. Degree declared saheeh by al-Albani. View ash-Shahihah (no. 1872).
This is in accordance with the words of Prophet sallallaahu 'alaihi
wasallam on continuing the hadeeth of Ibn' Abbas radi 'anhuma above.
Sources: Ash Magazine Sharia, no. 67/1432 H/2010, p. 76-77.