Abbas - Tanwîr al-Miqbâs min Tafsîr Ibn ‘Abbâs
(And We shall take out from every nation a witness) a prophet who will testify against them, i.e. that he conveyed the message to them; this prophet is the prophet who was sent to them in the life of the world (and We shall say: Bring your proof) why did you reject the messengers? (Then they will know) each nation will know (that Allah hath the Truth) that the worship of Allah and the religion of Allah are the Truth, and that their judgement is up to Allah, (and all that they invented) all that which they falsely worshipped (will have failed them) will become too preoccupied with themselves to help them.
And We shall draw, bring forth, from every community a witness, and this will be their prophet, who will bear witness against what they say, and We shall say, to them: ‘Produce your evidence’, for [the justification of] the idolatry which you asserted. Then they will know that the right, to divineness, is God’s — none share it with Him. And that which they used to invent, in this world, of His having an associate, exalted be He [high] above such [associations], will fail them.
This is another call by way of rebuke for those who worshipped other gods besides Allah. The Lord, may He be exalted, will call to them before all the witnesses, and will say:
أَيْنَ شُرَكَآئِىَ الَّذِينَ كُنتُمْ تَزْعُمُونَ
(Where are My (so-called) partners, whom you used to assert) meaning, in this world.
وَنَزَعْنَا مِن كُلِّ أُمَّةٍ شَهِيداً
(And We shall take out from every nation a witness,) Mujahid said, "This means a Messenger.''
فَقُلْنَا هَاتُواْ بُرْهَـنَكُمْ
(and We shall say: "Bring your proof.'') meaning, `of the truth of your claim that Allah had any partners.'
فَعَلِمُواْ أَنَّ الْحَقَّ لِلَّهِ
(Then they shall know that the truth is with Allah,) meaning, that there is no god besides Him. Then they will not speak and they will not be able to find any answer.
وَضَلَّ عَنْهُمْ مَّا كَانُواْ يَفْتَرُونَ
(and the lies which they invented will disappear from them.) they will vanish and will be of no benefit to them.
Maududi - Sayyid Abul Ala Maududi - Tafhim al-Qur'an
A witness": the Prophet who had warned that community, or a rightly-guided person from among the followers of the Prophets, who had performed the duty of preaching the Truth in the community, or a means through which the message of the Truth had reached the community.
That is, "Present a cogent argument in your defense so that you are pardoned. You should either prove that the shirk and the denial of the Hereafter and Prophethood in which you persisted were the correct creed and you had adopted it on rational grounds, or, if you cannot do that, you should at least prove that no arrangement had been made by God to warn you of this error and guide you to the right path."