Sūrah Yūnus, as the contents of its verses suggest, was revealed in Mecca at the beginning of the Prophet’s Mission. Furthermore, based on the connection that is evident between all of its verses, this chapter was revealed in a single go. Some scholars make an exception for the section of three verses beginning with, So if you are in doubt about what We have sent down to you, ask those who read the Book before you (10:94). Others make an exception for the verse, Some of them believe in it, and some of them do not believe in it, and your Lord best knows the agents of corruption (10:40). They say it was revealed about the Jewish tribes of Medina, but there is no evidence in the wording of any of these verses to support such a claim.
The main purpose for which this chapter was revealed is to emphasize the doctrine of monotheism by conveying warnings and glad tidings. It appears as though it was revealed after the idolaters of Mecca had rejected the Prophet’s claim to receive divine revelation and denounced the Qurʾan as nothing more than magic. Hence God responds to them by expounding that the Qurʾan is a heavenly book that has been sent down with His knowledge; that it contains teachings about divine unity, such as God’s oneness, knowledge, and power, the fact that all creation devolves to Him, the wonders of His conventions in creation, and the fact that they will all one day return to Him with their deeds—whether good or evil—in order that He might requite them; these are all demonstrated by the signs found in His creation of the heavens and the earth; and a human being will be guided to these teachings so long as they have a sound intellect. Therefore, the Qurʾan contains lofty truths that would only be rightly found in divine speech, not in the words of false and fabricated sorcery.
This is something that can be taken from the fact that the chapter opens by mentioning the idolaters’ denial the Qurʾan: Does it seem odd to these people that We have revealed… The faithless say, ‘This is indeed a plain magician’ (10:2), and that it closes with the words, And follow that which is revealed to you… (10:109). Throughout this chapter, God returns time and again to the issue of the revelation of the Qurʾan and their denial thereof, in verses such as: When Our manifest signs are recited to them … (10:15); This Qurʾan could not have been fabricated by anyone besides Allah … (10:37); O mankind! There has certainly come to you an advice from your Lord (10:57); So if you are in doubt about what We have sent down to you (10:94).
The repetition of this topic throughout the verses of the chapter, together with its opening and closing sections, shows that it was revealed after the idolaters had denied that the Qurʾan was the word of God and denied that the Prophet had received any revelation whatsoever. That is why the bulk of this discussion of this chapter revolves around threats of punishment against those of the Prophet’s people who deny God’s signs, and a warning that He will judge between the Prophet and between them, and that this is God’s convention in dealing with His creatures, after which He concludes the chapter. Hence, this is one of the distinguishing features of the chapter, to the extent that it is known as the chapter that warns the Prophet’s people that God will judge between the Prophet and them: be patient until Allah issues judgement, and He is the best of judges (10:109).