Stoning was punishment for adultory in previous scriptures.
Bible: Deut:22:21 Then they shall bring out the damsel to the door of her father's house, and the men of her city shall stone her with stones that she die: because she hath wrought folly in Israel, to play the ***** in her father's house: so shalt thou put evil away from among you...22:22 If a man be found lying with a woman married to an husband, then they shall both of them die, both the man that lay with the woman, and the woman: so shalt thou put away evil from Israel....22:24 Then ye shall bring them both out unto the gate of that city, and ye shall stone them with stones that they die;
Islam maintained that punishment for married person(adultory) for a period of time BUT finally punishment was changed to 100 lashes for both married & un-married.
Here r few points i would like to put to prove my point:-
<1>
One way of changing some law is by stating it clearly to prophet.
Another way of changing some law is that God removes that law from memory of prophet & others.
[Quran:2:106]"None of Our revelations do We abrogate or cause to be forgotten, but We substitute something better or similar: Knowest thou not that God Hath power over all things?"
[87:6]"By degrees shall We teach thee to declare (the Message), so thou shalt not forget, Except as God wills: For He knoweth what is manifest and what is hidden."
So verses about stoning were abrogated as evident in next point.
<2>
Umar(ra) & other once remembered verses on stoning by-heart BUT all of them were made to forget them(c.f.Quran:2:106) that's why no such verse is seen in Qur'an.
Despite recalling that he memorised that verse Umar(ra) is un-able to recall the exact verse.
Bukhari:82:817:-
.......... Allah sent Muhammad with the Truth and revealed the Holy Book to him, and among what Allah revealed, was the Verse of the Rajam (the stoning of married person (male & female) who commits illegal sexual intercourse, and we did recite this Verse and understood and memorized it. Allah's Apostle did carry out the punishment of stoning and so did we after him.................................. And then we used to recite among the Verses in Allah's Book:...........
<3>
Some Companions of Prophet Muhammad(saww) were of the point that Prophet gave stoning punishments BEFORE surah-al-Noor (was revealed in it's final shape with verse on stoning abrogated ):-
Bukhari:82:824:-
Narated By Ash-Shaibani : I asked 'Abdullah bin Abi 'Aufa about the Rajam (stoning somebody to death for committing illegal sexual intercourse). He replied, "The Prophet carried out the penalty of Rajam," I asked, "Was that before or after the revelation of Surat-an-Nur?" He replied, "I do not know."
<4>
Law regarding adultory went through changes like Prophet gave 100lashes+EXILE to un-married WHILE Qura'n doesn't mention EXILE in Quran:24:2:-
Bukhari:48:817:-
Narated By Zaid bin Khalid : Allah's Apostle ordered that an unmarried man who committed illegal sexual intercourse be scourged one hundred lashes and sent into exile for one year.
<5>
Another example of such change in laws was that initially 4 witnesses were required even if SPOUSE alleges other spouse.
But later SPOUSE was given more reliability as in Qura'n:24:6-7.
This story of change in rules in in this Hadees:
Bukhari:60:271:-
Narated By Ibn Abbas : Hilal bin Umaiya accused his wife of committing illegal sexual intercourse with Sharik bin Sahma' and filed the case before the Prophet. The Prophet said (to Hilal), "Either you bring forth a proof (four witnesses) or you will receive the legal punishment (lashes) on your back." Hilal said, "O Allah's Apostle! If anyone of us saw a man over his wife, would he go to seek after witnesses?" The Prophet kept on saying, "Either you bring forth the witnesses or you will receive the legal punishment (lashes) on your back." Hilal then said, "By Him Who sent you with the Truth, I am telling the truth and Allah will reveal to you what will save my back from legal punishment." Then Gabriel came down and revealed to him:
'As for those who accuse their wives...' (24.6-9) The Prophet recited it till he reached: '...(her accuser) is telling the truth.' Then the Prophet left and sent for the woman, and Hilal went (and brought) her and then took the oaths (confirming the claim). The Prophet was saying, "Allah knows that one of you is a liar, so will any of you repent?" Then the woman got up and took the oaths and when she was going to take the fifth one, the people stopped her and said, "It (the fifth oath) will definitely bring Allah's curse on you (if you are guilty)." So she hesitated and recoiled (from taking the oath) so much that we thought that she would withdraw her denial. But then she said, "I will not dishonour my family all through these days," and carried on (the process of taking oaths). The Prophet then said, "Watch her; if she delivers a black-eyed child with big hips and fat shins then it is Sharik bin Sahma's child." Later she delivered a child of that description. So the Prophet said, "If the case was not settled by Allah's Law, I would punish her severely."
<6>
(I don't remember reference # for following hadees)
Once Prophet asked a man how he'd solve an issue, he replied he'll seek guidence from Qur'an.
Prophet asked IF he didn't find sulotion in Qur'an THEN???, he replied he'll seek guidence from Sunnah(Deeds of Prophet).
Prophet asked even IF he didn't find solution in sunnah THEN?
He replied he'll decide HIMSELF in light of Qur'an & Sunnah & Prophet praised him.
So here's the sequence for us to follow:-
Qur'an>>If Quran doesn't offer answer, ONLY THEN>>Sunnah>>If sunnah doesn't offer answer, ONLY THEN>>>Own Decision in light of Quran & Sunnah.
So when Quran says punishment for adultory is 100 lashes irrespective of marital status, we got our answer. There's no need to go any further.