The Quran states that the Sun has a setting place and a rising place on the Earth. Listen to Quran 18:86 -
Word by word grammar: http://corpus.quran.com/wordbyword.jsp?chapter=18&verse=86
Pickthall: Till, when he reached the setting-place of the sun, he found it setting in a muddy spring, and found a people thereabout. We said: O Dhu'l-Qarneyn! Either punish or show them kindness.
Pickthall gives the correct translation of this verse. Some others have tried to twist the words to make it seem like "he reached the setting of the sun" instead of the correct translation "he reached the setting place of the sun"...
I will clearly explain how. Please refer to the word by word grammar of the quran i linked above as you follow my explanation.
The verse 18:86 in arabic: "Hattaa idhaa balagha maghriba al-shamsi wajadahaa taghrubu fee aynin hamiyatin wawajada indahaa qawman. Qulnaa yaadha al-qarnayni! Imma antu adhiba wa imma an tattakhidha feehim husnan."
Lets look at this part by part: The verse 18:85 states that he (Dhul Qarnayn) followed a way... Now 18:86 - "hattaa idhaa" meaning "until when"...
"balagha" means "he reached"
"maghriba al-shamsi"... this is where the translators are causing confusion. This actually can mean "setting place of the sun" or "time of sunset".... but it is very clear from the context that here, it means "setting place of the sun". Dont believe? Try putting the other meaning here. Then it would read - "He followed a way until when he reached the time of sunset".... This is absurd. Why would anyone say "he reached the time of sunset"?
If that was what "allah" wanted to tell us, he could have simply said "he followed a way until the sun set". Why the use of the word "balagha" (he reached)? Because he actually meant "he reached the place of sunset". It is clear....
There is no use trying to mistranslate it as "he reached the place at the time of sunset" etc... because that requires insertion of new words absent in the Quran.
Now some people also try to translate maghriba as "west" or "far west". While it is true that maghrib can also mean "west", the words "maghriba al-shamsi" would then translate to "west of the sun" which is another clear absurdity. When maghrib is used along with "al-shamsi", that means the setting place (or time) of the sun.
Infact, the Quran repeats a similar mistake in verse 18:90 (http://corpus.quran.com/translation.jsp?chapter=18&verse=90) -
Till, when he reached the rising-place of the sun, he found it rising on a people for whom We had appointed no shelter therefrom.
Word by word grammar: http://corpus.quran.com/wordbyword.jsp?chapter=18&verse=90#(18:90:1)
The Arabic words used are "matliaa al-shamsi" which invariably means "Rising place of the sun" (again it is a place, not time because Dhul Qarnayn is said to have reached there). Why? Because "matliaa" cannot be translated as "east". East is always referred to as "mashriq" in the Quran.
In this context, the meaning "time of sunrise" for "matliaa al-shamsi" can be ruled out similar to how I explained above, the meaning of "maghriba al-shamsi".
Another defense by Muslim apologetics is - "Where does it say that the setting place of the sun is on the earth?" The answer is simple. It says that Dhul-Qarnayn followed a way until he reached the setting place of the sun. If the author of Quran knew that the sun does not have a setting place on the earth, then why would he say that Dhul-Qarnayn reached that place? Similarly, the Quran states that he reached the place of sunrise.
So it is clear, the Quran says that sun has a setting place on the earth - More specifically, a muddy spring. Also, it says that the sun has a rising place on the earth.
Now people like Zakir Naik have also tried mistranslating the latter part of the verse as "it appeared to Dhul Qarnayn" that sun set in a muddy spring. He claims that meaning of "wajada" is "appeared to".... but the actual meaning is "found"... ie, the verse states that he found the sun setting in a muddy spring. Want further proof? See the same word "wajada" used in the latter part of the verse.... if Zakir is correct, it would be like this - "It appeared to Dhul-Qarnayn that there were people at the place".... this is nonsense.. this nonsense is due to Zakir's mistranslation of the word "wajada". Wajada means found.
And here is the final blow - Muddy springs are too small to cause the illusion of sun setting in them. So, to say that "it appeared to him that sun set in a muddy spring" is highly improbable. It would take the sea or atleast a very large lake for this illusion to happen. Even if it did appear to someone that the sun is hitting the horizon on the surface of a muddy spring, all the person needs to do is to take a few steps forwards or sideways and then the land, trees or hills on the other side of the spring would be easily visible to him.
Just take a look at a typical muddy spring...
So, the Quran states clearly that the sun has a setting place and rising place on the earth. More specifically, a spring of dark mud. For those who believe in authentic hadiths, lets go further. Read this hadith (classified as sahih or authentic by famous Muslim scholar Al-Albani who is reputed for his investigation into the authenticity/chains of transmission of hadiths).
Sunan Abu Dawud 31:3991
Narrated Abu Dharr:
I was sitting behind the Messenger of Allah (ﷺ) who was riding a donkey while the sun was setting. He asked: Do you know where this sets ? I replied: Allah and his Apostle know best. He said: It sets in a spring of warm water (Hamiyah).
Here, Muhammad affirms his follower Abu Dharr without a shade of doubt that the sun sets in hamiyah (A spring of dark mud or warm water depending on translation).
After knowing this, it is absurd to think that Quran is the word of god or that Muhammad is a messenger of god.