(And We said to the Children of Israel after him (after Musa died): "Dwell in the land, then, when the final and the last promise comes near, We shall bring you altogether as a mixed crowd (gathered out of various nations).")17:104
مِّنْهُمُ الصَّـلِحُونَ وَمِنْهُمْ دُونَ ذَلِكَ
(some of them are righteous and some are away from that), some of them are led aright and some are not righteous, just as the Jinns declared,
The preceding verse (169) contained a mention of a covenant made with the religious leaders of the Israelites in particular, that they shall not make any changes in the Torah and shall not ascribe to Allah anything but the truth. It has already been mentioned that they violated this pledge and distorted the contents of the Torah for petty amounts of money. This verse is an extension of the same theme. It says that there are some among their religious leaders who are truth-fully following the commands of the Torah and are firmly adhering to its guidance. They established the Salah as was required. The verse has provided with an assurance to such people that they shall not be deprived of their reward. That is, those who have been true to their faith and fulfilled its demands are righteous people among them.
There are some points of discussion related to this verse. The term 'Book' most probably refers to the Torah. Another possibility is that it refers to all the heavenly books of Allah like Torah, Injil and the Qur'an. Another point to be noted is that merely keeping the book of Allah and showing respect to it without following its' commandments does not fulfill the very object of its revelation. It is why the verse has used the word يُمَسِّكُونَ "Hold fast", in place of يَأْخُذُونَ or یَقرَؤنَ "those who take it or read it. Holding fast the Book requires to follow all it's injunctions and commands.
The next thing we note in this verse is that out of a large number of doctrines of the Torah the verse has made mention of "establishing 'Salah' only. This is because the Salah is the most significant and purposeful act among the precepts enjoined by Allah. This is, in fact, the most basic and quintessential way of expressing one's faith in, and obedience to, Allah. Offering the Salah regularly makes one capable of being regular in other worships more willingly and with more ease. The Holy Prophet ﷺ has termed the Salah as being the pillar of Islam. The whole edifice of Islam rests on it. Whoever has erected it properly has built the whole structure of his faith on a stronghold. Any one not regular in Salah, is of no worth to Allah, even if he is seen reciting His name all the times and has unusual visions and does extraordinary acts.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 169–171
During the time of Moses, Jews were given the commandments of God, the event having taken place at the foot of a hill. At that time such conditions were created that the Jews felt as if the hill was about to fall on them. This was to impress upon them that giving a pledge to God was a very serious matter, and that if they did not fulfil the conditions of the pledge, they had to remember that the other party to this pledge was that majestic Being who, if He so desired, could cause the hill to fall on them. At that time, there were many people among the Jews who were God-fearing and righteous in their deeds. But, later on, they gradually adopted the world as the goal of their life. They started accumulating wealth without having any scruples about its being legitimate or otherwise. Even then, they used to read the Holy Book, but by means of self-devised interpretations, they gave it such a colour that God Himself appeared to be supporting their rebellious way of life. Their insensitiveness increased to the extent that they took satisfaction in declaring, ‘We are a pious community; we are the progeny of prophets; God will forgive us in the name of His favourite subjects.’
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.