On reaching the Earthly Paradise, Virgil the guide crowns and miters Dante. Why?
At this point in Purgatorio, we're well beyond the Valley of Princes which is the last level before the gate that leads to Purgatory proper with its seven terraces (see Cantos 7 and 8). It is only after scaling the rest of the mountain and passing through the barrier of fire that the poets (Dante, Virgil, and Statius) enter Earthly Paradise.
What Virgil is saying in this famous line is that he, in his capacity as natural reason, has led Dante as far as he can. Since the Pilgrim has seen the horror of unrepented sin in Hell and been through all of the various levels of Purgatory, he is ready to begin the final ascent--a task that requires Beatrice. From the point of view of natural reason, since his "will is upright, wholesome and free" (XXVII, 140), he is the perfect son of the City of God and of the Holy Church. Hence, he is, so to speak, crowned and mitered by Virgil to indicate that he has achieved the type of freedom that can only be achieved by having one's desires aligned with reason. He has passed beyond a point where earthly authority (emperor and pope) is necessary.
On might think that the poem would end here. However, the Pilgrim's soul still needs to grow in grace and charity, still needs to adorned with the virtues. His spiritual insight needs to be expanded and strengthened. This begins when Beatrice appears at the end of the Purgatorio and is the main action of the Paradiso.
Virgil's complete quote is from Canto XXVII, line 142, which reads, " I crown and miter you lord of yourself!"
The crowning of Dante, then, makes him responsible for his own choices here on earth. As the two exit Purgatory, Dante is shown a lush and lovely valley. There, he observes many dead European monarchs, as well as other luminaries who became too obsessed with their eartly duties. As a consequence, their reliance on faith suffered (Cantos VII and VIII).
Dante now has seen the consequences of earthly actions, he is the king and defender of his life. What he does while alive will therefore determine his afterlife.