The one who speaks to the people through his prophet is the Lord of hosts, the God of Israel.
This should remind the people of the power of the Lord with whom they have a covenant. The covenant suzerain is calling on those who, by coming to the temple, give at least a formal acknowledgement that they are his vassals.1 The call he makes is for the people to amend their ways.
The literal meaning is for them to make good your ways and your doings.
They are to change their whole way of doing and the direction of their lives.2 If the people respond in obedience and do amend their ways, then the Lord will let them dwell in this place.
It is not clear what place is being referred to. It could be the temple, or Jerusalem, or the land itself. In terms of the covenant the Lord had made with Israel, all three are probably being referred to. There is also ambiguity in the Hebrew in that the phrase could also mean, I will dwell with you in this place.
3 Again, in terms of the covenant, the promise the Lord had made was not just to give the people a land to live in, but that he would be their God and he would dwell with them in the land. The temple in Jerusalem represented his presence with them. The main point being made is that if the people continue to reject the Lord’s rule over their whole lives, then he is not obligated to continue to allow them to live in the land, in his presence (Deuteronomy 7:12–15). The people are mistaken to assume that the Lord was somehow bound to them by the mere presence of the temple. Their presence in the land and his presence with them was an act of grace. The temple, and even their worship in the temple, was of no value if the Lord no longer made his grace manifest among the people.4
3 Thus says the LORD of hosts, the God of Israel: Amend your ways and your deeds, and I will let you dwell in this place.