First, let's get some basic information out of the way. Joshua here is not the Joshua of the Two Faithful Spies and Successor of Moses. This is the high priest who returned from Babylon with the exiles. Understand, that meant the exiles were careful to keep their genealogies intact. This had to be an exciting time for Joshua. Ezekiel and his colleagues had been priests without a Temple. The only duty that a priest in exile could perform lawfully was teaching the Law. Finally they have the opportunity to perform all the tasks they had trained for.
However, in this vision, Joshua, the high priest, represents the people standing before the Accuser in a trial of sorts. There is no doubt about his guilt—he is clothed in filthy garments, plainly identified as "iniquity." Animal sacrifices are never mentioned. It takes heavenly beings to remove the dirty clothing and only God himself can replace them with garments suitable for spiritual service as priests.
Then the Branch is introduced in the same vision, in the same context. While he is not specifically identified here, in 6:12,13 we see that he will build the Temple of the Lord and rule as priest on his throne. From many other passages, we are certain this is the Messiah. And look what he is associated with in this night vision: the removal of iniquity "in one day." You can argue about whether that day is his crucifixion, his resurrection, or even the Day of Pentecost when "the land" (Isa 66:8) came into existence. Whichever it is, we know that salvation is coming with this "Branch."
And not only that, but every one of you will invite his neighbor to come under his vine and under his fig tree. To those people, dwelling under your vine and fig tree symbolized peace and security. With the trials these returning exiles continued to experience, with the arbitrary nature of the pagan kings they counted upon for provisions, the droughts and crop failures, the enemies who lived just over the rise, security sounded wonderful. It was icing on the promised Messiah cake.
And we too need this vision. Sometimes we forget the wonderful thing our Savior has accomplished for us—saving us from sin—because we are so wrapped up in the trials of life. We have security and peace too, not from persecution, not from the calamities of a physical world, but from the wrath of God. Our sins have been removed. That is what we have to share with our neighbors. That is the peace we invite them to—peace with God. But if they do not see the joy and peace it brings in our lives, even in the midst of trials, they won't think it is worth very much either.
Peace I leave with you; my peace I give to you. Not as the world gives do I give to you. Let not your hearts be troubled, neither let them be afraid. (John 14:27)