And We assigned them Imams who guide by our authority and We have inspired in them the doing of good deeds (Quran 21:73)
And We appointed from among them some Imams who guide by our authority since they were patient and believed firmly in Our Signs (Quran 32:24)
Moreover, on the commentary of Quranic verse:
And lo! verily I am Forgiving toward him who repents and believes and does good deeds, and afterward he accept guidance (Quran 20:82)
Ibn Hajar mentioned that it is narrated from Imam Muhammad al-Baqir (AS)
as well as Thabit al-Lubnani that, the end of verse means
"He is guided to the Wilayah of the Ahlul-Bayt"
(al-Sawa'iq al-Muhriqah, by Ibn Hajar al-Haythami, Ch. 11, section 1, p235).
Allah, Exalted, also said:
"O' you who believe! Obey Allah, and Obey Apostle and those from among you who are given authority (by Allah)." (Quran 4:59)
Who are those Imams whom Allah gave authority and are to be obeyed beside the Prophet?
The above verses of Quran prove beyond doubt that a divinely appointed Imam has authority and he guides. The authority of Imam is not restricted over a group of people but also covers every other creatures (see Quran 36:12 which uses the word Imam for keeping the account of everything).
Again, this authority is controlled by Allah. Allah also said in Quran:
"(O' Muhammad!) You are but a Warner, and for every community there exists a Guide." (Quran 13:7).
Prophet Muhammad was a Warner, and the Imams of his Ahlul-Bayt were each a Guide for the people of their time.
In fact, the following Sunni commentators of Quran narrated that the word "Guide" in the above verse was Imam Ali (AS).
Tafsir al-Tabari, v13, p72;
Tafsir al-Kabir, by Fakhr al-Razi, on the commentary of verse 13:7
Tafsir al-Durr al-Manthoor, by al-Suyuti, under verse 13:7 of Quran
Kanz al-Ummal, by al-Muttaqi al-Hindi, v6, p157
Noor al-Absar, by al-Shablanji, p70
Kunooz al-Haqa'iq, by al-Manawi, p42.