Sunnis believe that the Quran is uncreated - that it has always existed. Is there a Quranic ayah stating this? On what basis do Sunnis claim this to be true?
The different Sunni groups like the Atharis and the Asharis agree that the Quran is the speech of Allah, uncreated and eternal. The way in which they prove this may differ however. The Asharis and Maturidis would present many philosophical proofs that the speech of Allah is uncreated. I won't go into those.
But, I will mention some of the many evidences. Note that there are two aspects to this issue. The first is that the Quran is the speech of Allah, and the second is that the speech of Allah is uncreated. It is an attribute of His like knowledge or hearing. It cannot be created because no attribute of Allah can be created.
I will divide the evidences into three broad categories although they all may have proofs of other categories: 1) Allah speaks, 2) Allah's speech is uncreated, and 3) the Quran is the speech of Allah.
1. Allah Speaks
Evidence 1: Allah criticizes false gods for being speechless
Allah criticizes idols and false gods in many places of the Quran Himself or by quoting prophets, and one of the criticisms he gives of them is they do not speak. Allah says:
He (Ibrahim) said, "Rather, this - the largest of them - did it, so ask them, if they should [be able to] speak."
So they returned to [blaming] themselves and said [to each other], "Indeed, you are the wrongdoers."
Then they reversed themselves, [saying], "You have already known that these do not speak!" (21:62-64)
And the people of Moses made, after [his departure], from their ornaments a calf - an image having a lowing sound. Did they not see that it could neither speak to them nor guide them to a way? They took it [for worship], and they were wrongdoers. (7:148)
Did they not see that it (the calf) could not return to them any speech and that it did not possess for them any harm or benefit? (20:89)
If someone wants to deny that Allah speaks and everything that we claim to be the Quran is actually only creation, how is that appropriate?
That causes Allah to fall into the same criticism that Allah criticizes the idols for. Speechlessness is a defect. It is necessary that Allah be free from defects and thus have the attribute of speech.
Evidence 2: Allah describes Himself as speaking
Allah says that He spoke to Musa (AS):
Those messengers - some of them We caused to exceed others. Among them were those to whom Allah spoke, and He raised some of them in degree. [...] (2:253)
[...] And Allah spoke to Moses with speech. (4:164)
And when Moses arrived at Our appointed time and his Lord spoke to him [...] (7:143)
Allah says that He will not speak to disbelievers on the Day of Judgement implying that He speaks to the believers:
Indeed, those who exchange the covenant of Allah and their [own] oaths for a small price will have no share in the Hereafter, and Allah will not speak to them or look at them on the Day of Resurrection [...] (3:77)
Indeed, they who conceal what Allah has sent down of the Book and exchange it for a small price - those consume not into their bellies except the Fire. And Allah will not speak to them on the Day of Resurrection, [...] (2:174)
All of these use the verb for "speak" (kallama), and there can be no confusion about what this word means.
As for the verb "say" (qaala), the amount of times it has been attributed to Allah is countless and too much to count.
Allah has attributed himself with the action and verb of speech countless times. Whoever says the speech of Allah is created needs to say the actions of Allah are created, and this is irrational and impossible.
2. Allah's Speech is Uncreated
Evidence 3: Separation between creation and command
When Allah separates between two things with an "and," that is evidence they are two different things. Allah says:
[...] Unquestionably, His is the creation and the command; blessed is Allah, Lord of the worlds. (7:54)
Allah separates here between creation and command, meaning the command is not the creation itself. So, the commands of Allah which is basically speech are not a creation.
Evidence 4: Allah tells us exactly how He speaks, and creation is not one of the options
And it is not for any human being that Allah should speak to him except by revelation or from behind a partition or that He sends a messenger to reveal, by His permission, what He wills. Indeed, He is Most High and Wise. (42:51)
The verse clearly emphasizes two things: 1) the speech of Allah is something special and different from creation (or else what would be the point of specifying these methods?), and 2) the speech is spoken directly or revealed through a messenger, it is not created.
Evidence 5: The speech of Allah is endless
Allah emphasizes this in multiple verses. He says:
Say, "If the sea were ink for [writing] the words of my Lord, the sea would be exhausted before the words of my Lord were exhausted, even if We brought the like of it as a supplement." (18:109)
And if whatever trees upon the earth were pens and the sea [was ink], replenished thereafter by seven [more] seas, the words of Allah would not be exhausted. Indeed, Allah is Exalted in Might and Wise. (31:27)
Nothing except an attribute of Allah can be endless and perfect. Created things end. That is why speech is an attribute of Allah, and the Quran is the speech of Allah.
Evidence 6: There is no change to the speech of Allah
Allah says many times in the Quran:
No change is there in the words of Allah. (10:64)
There is no changer of His words. (6:34, 6:115, 18:27)
It is obvious that only uncreated and eternal things are never changing.
Evidence 7: Allah creates things with His speech
Allah tells us in multiple places that He speaks whenever He wants to create something. Allah says:
His command is only when He intends a thing that He says to it, "Be," and it is. (36:82)
When He decrees a matter, He only says to it, "Be," and it is. (2:117, 3:147, 19:35, 40:68)
Indeed, Our word to a thing when We intend it is but that We say to it, "Be," and it is. (16:40)
If we know that Allah creates by saying "Be" which is speech, suppose speech was a creation. Then, to say "Be", Allah needs to say "Be" before it to create it! Then, before that "Be", there needs to be another "Be"! It is a paradox.
The only correct understanding is that the speech of Allah is not a creation. He does not need to create speech. He simply speaks it however He wants whenever He wants.
3. Quran is the Speech of Allah, uncreated
Evidence 8: Saying the Quran is created is bidah
In the Quran, Allah always say he "sent down" (nazzala or anzala) the Quran. He never says he created it. The default about something from Allah ascribed to Allah is not that we assume it is created.
So, the people who claim the Quran is created need to bring their proof. Absence of proof, one must refrain from saying the Quran is created. In other words, he must maintain the Quran is uncreated.
Evidence 9: Ijmaa of the Traditionalists
Imam Bukhari narrates in his book Khalq Af'aal al-Ibaad:
Sufyan ibn Uyayna narrated: I met our teachers for seventy years among them Amr ibn Dinar, all of them used to say, "The Quran is the speech of Allah, and it is not created."
When the scholars of hadith and Sunnah agreed entirely to this fact, how is it possible to oppose them. There are many countless narrations mentioning prominent scholars from the Salaf severely condemning and even takfiring people who claimed the Quran was created.
Note that Sunnis consider Ijmaa a proof in Islam because of verses like "And whoever opposes the Messenger after guidance has become clear to him and follows other than the way of the believers - We will [...] drive him into Hell [...]" and because the Prophet (SAW) said "Allah will not unite my Ummah on misguidance."
The claim that the Quran was created began later on among sects like the Mutazilah, and the Salaf were opposed to this claim as mentioned.
Evidence 10: Allah says the Quran was taught, and does not say created
Allah says in the beginning of Surah Rahman:
Ar-Rahman. He taught the Quran. He created man. He taught him eloquence. (55:1-4)
Allah contrasts the teaching of the Quran with the creation of man. Never in the Quran does Allah ever say the Quran was created. He always says it was either taught or sent down or revealed.
Evidence 11: Allah negates the Quran being the speech of men
Allah describes the disbelievers saying about the Quran:
This is not but the word of a human being. (74:25)
So, anyone who claims the Quran is just the word of a human being is going against the clear Quran. However, we all agree the Quran is words. So, who is it truly and ultimately the word of?
Obviously, none is left except Allah when we negate human beings.
Nor does he speak from [his own] inclination. It is not but a revelation revealed, Taught to him by one intense in strength (53:3-5)
Allah denies that the Quran is anything except revelation itself. It is taught, not created.
Evidence 12: Allah refers to the Quran as the Speech of Allah
Allah says, referring to the Torah as the speech of Allah:
Do you covet [the hope, O believers], that they would believe for you while a party of them used to hear the speech of Allah and then distort it after they had understood it while they were knowing?
Allah says, referring to the Quran as the speech of Allah:
And if any one of the polytheists seeks your protection, then grant him protection so that he may hear the speech of Allah. Then deliver him to his place of safety. That is because they are a people who do not know. (9:6)
Both of these verses confirm that the revelation sent down in the form of books is the speech of Allah, and it can be "heard."
I wished to write more, but that is enough for the time being.
Because of all the clear evidences, Ahlus-Sunnah affirm that 1) the Quran is the speech of Allah in reality and 2) the speech of Allah is uncreated and cannot be created.
Rather, the speech of Allah is an eternal attribute of His like His knowledge and His hearing. He speaks whenever He wishes however He wishes, and His speech is not created. He spoke the Quran, and He spoke to some prophets like Musa (AS).