6 Then I heard what seemed to be the voice of a great multitude, like the roar of many waters and like the sound of mighty peals of thunder, crying out, "Hallelujah! For the Lord our God the Almighty reigns.
7 Let us rejoice and exult and give him the glory, for the marriage of the Lamb has come, and his Bride has made herself ready;
8 it was granted her to clothe herself with fine linen, bright and pure -- for the fine linen is the righteous deeds of the saints.
9 And the angel said to me, "Write this: Blessed are those who are invited to the marriage supper of the Lamb." And he said to me, "These are the true words of God."
The bride is given her wedding garment, (it was granted her to clothe herself), which are the righteous deeds of the saints, from the Greek word; dikaiōma, i.e. righteous deeds, the deeds which are the product of having been justified in Christ and having His righteousness imputed to us solely by the sovereign will and purpose of the Father, and for no other reason than that.
This ties into;
8 For by grace you have been saved through faith. And this is not your own doing; it is the gift of God,
9 not a result of works, so that no one may boast.
10 For we are his workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them.
Also to what James is speaking of regarding faith and works;
James 2: 18 But someone will say, "You have faith and I have works." Show me your faith apart from your works, and I will show you my faith by my works.
Our deeds do not save us, but the post-conversion work of the saints is evidence that the finished work of Christ's atoning death, which is the justification of the saints, is at work in the lives of the saints.
Now the city, the New Jerusalem, is the bride (Rev 21:2 and 9-11), but the city consists of those who inhabit it, which we will and do. That is why she is clothed in our righteous deeds. We are the ones saved solely by God's grace through election in Christ, and our deeds display His righteousness. We do not perform any work to justify ourselves, sanctify ourselves nor to make ourselves "better" people, thus more pleasing to God. All he has placed in Christ are pleasing to Him, since Christ is the one in whom He is well pleased. (Matthew 3:17; Hebrews 11:6; Hebrews 12:2a) This stands in sharp contrast to the earthly Jerusalem which Paul describes:
22 For it is written that Abraham had two sons, one by a slave woman and one by a free woman.
23 But the son of the slave was born according to the flesh, while the son of the free woman was born through promise.
24 Now this may be interpreted allegorically: these women are two covenants. One is from Mount Sinai, bearing children for slavery; she is Hagar.
25 Now Hagar is Mount Sinai in Arabia; she corresponds to the present Jerusalem, for she is in slavery with her children.
26 But the Jerusalem above is free, and she is our mother.
27 For it is written, "Rejoice, O barren one who does not bear; break forth and cry aloud, you who are not in labor! For the children of the desolate one will be more than those of the one who has a husband."
28 Now you, brothers, like Isaac, are children of promise.
29 But just as at that time he who was born according to the flesh persecuted him who was born according to the Spirit, so also it is now.
30 But what does the Scripture say? "Cast out the slave woman and her son, for the son of the slave woman shall not inherit with the son of the free woman."
31 So, brothers, we are not children of the slave but of the free woman.
The earthly Jerusalem is enslaved to the law/legalism, that is, works righteousness, and the citizenry are constantly laboring under the burden of this self-righteousness, to redeem themselves before God. The heavenly (New) Jerusalem, the free woman, is our mother and we are born again children, not by our choosing, but by the Father's sovereign will.
The earthly Jerusalem reflects the glory of man which is no glory at all (2 Cor 3:7-11)
The New Jerusalem displays the glory of God the Father, pointing to the glorified bridegroom, that is the Son.
The righteousness of the saints is His righteousness imputed to us, thus the bride is given her wedding garment by the Lord.
The garment which consists or man’s (self) righteousness is a soiled and stained rag, and no one gets into the wedding feast in such attire.
Isaiah 64: 6 We have all become like one who is unclean, and all our righteous deeds are like a polluted garment. We all fade like a leaf, and our iniquities, like the wind, take us away.
11 "But when the king came in to look at the guests, he saw there a man who had no wedding garment. 12 And he said to him, 'Friend, how did you get in here without a wedding garment?' And he was speechless. 13 Then the king said to the attendants, 'Bind him hand and foot and cast him into the outer darkness. In that place there will be weeping and gnashing of teeth.' 14 For many are called, but few are chosen."
22 And I saw no temple in the city, for its temple is the Lord God the Almighty and the Lamb.
23 And the city has no need of sun or moon to shine on it, for the glory of God gives it light, and its lamp is the Lamb.
24 By its light will the nations walk, and the kings of the earth will bring their glory into it,
25 and its gates will never be shut by day--and there will be no night there.
26 They will bring into it the glory and the honor of the nations.
27 But nothing unclean will ever enter it, nor anyone who does what is detestable or false, but only those who are written in the Lamb's book of life.