Overall meaning :
Addressing His Prophet, Muhammad, may Allah bless him and grant him peace, Allah Almighty says: We relate to you of the stories of those earlier communities to give you and the believers solace, serve as an admonition to the pious and as a deterrent to the unbelievers. Their messengers came to them with evidence attesting to their truthfulness, but they would not believe in anything they had brought them because of having rejected the truth the first time it was shown to them. Thus does Allah seal up the hearts of the unbelievers so much so that they will never believe.
The Almighty further states that He found the larger part of the past nations which He had destroyed untrue to their covenants, and that most of them were rebellious and disobedient and immersed in evil.
Then He mentions that, after the prophets whose stories He has recounted, He sent Moses to Pharaoh and his chiefs with clear proofs and miracles attesting to the truthfulness of what he had brought, but they wronged themselves by disbelieving them and arrogantly spurning them. 'See, then,’ He says to His Prophet, Muhammad, may Allah bless him and grant him peace, 'the fate of the evil-doers.’