We broke their unity as a nation and dispersed them into different communities all over the earth – some of them are righteous and others are the opposite – We tested them with both blessings and misfortunes so that they might turn to the Right Way.
Meaning:-
Disperse: distribute, spread, scatter.
Righteous: (of a person or conduct) morally right or justifiable; virtuous, very good; excellent.