(They are) refers to those who believe in the Unseen, establish the prayer, spend from what Allah has granted them, believe in what Allah has revealed to the Messenger and the Messengers before him, believe in the Hereafter with certainty, and prepare the necessary requirements for the Hereafter by performing good deeds and avoiding the prohibitions. Allah then said,
(On guidance) meaning, they are (following) a light, guidance, and have insight from Allah,
(And they are the successful) meaning, in this world and the Hereafter. They shall have what they seek and be saved from the evil that they tried to avoid. Therefore, they will have rewards, eternal life in Paradise, and safety from the torment that Allah has prepared for His enemies.