Exo 33:5 For the LORD had said to Moses, “Say to the people of Israel, ‘You are a stiff-necked people; if for a single moment I should go up among you, I would consume you. So now take off your ornaments, that I may know what to do with you.’”
In Exodus 33:5, Israel has just rebelled against Yahweh at Mount Sinai. Israel was purged twice, once by sword (32:28) and once by divine plague (32:35). Those who are left do not wear ornaments because God commanded that they should not. The text indicates the purpose of refraining from ornamentation is that God might “know what to do with you”. This appears to be a test. God will further decide how to treat Israel based on their behavior. Will Israel show repentance and sorrow? Will they show hardheadedness?
Albert Barnes writes: That I may know … – By that sign of their repentance Yahweh would decide in what way they were to be punished.