Symbolism, Imagery, Allegory
Shakespeare uses the sun as a metaphor for kingly power and strength throughout this entire cycle of history plays. (What? You don't believe us? Fine. When you're done here, go read about "Symbolism" in Henry IV Part 1 and Henry V.) For now, let's think about the sun's function in Richard II.
When King Richard rules England, he's associated with the sun's majesty and glory. Check out what Richard says when he finds out that Henry Bolingbroke has raised an army and is coming after him:
So when this thief, this traitor, Bolingbroke,
Who all this while hath revell'd in the night
Whilst we were wandering with the antipodes,
Shall see us rising in our throne, the east,
His treasons will sit blushing in his face,
Not able to endure the sight of day,
But self-affrighted tremble at his sin. (3.2.3)
Richard obviously thinks he's pretty awesome, because he directly compares himself to a "rising" sun. He also thinks that when Bolingbroke sees him in all his sun-like majesty, he'll be shaking in his boots. But that's not quite what happens when Bolingbroke confronts the king at Flint Castle. When Bolingbroke corners the king with his army, he looks up and sees Richard on the castle walls. He compares Richard to the sun all right, but it's a sun that's about to be overshadowed by a bunch of ominous clouds (a.k.a. the rebel army):
See, see, King Richard doth himself appear,
As doth the blushing discontented sun
From out the fiery portal of the east,
When he perceives the envious clouds are bent
To dim his glory and to stain the track
Of his bright passage to the occident. (3.3.5)
We've heard this before when Salisbury predicted Richard's downfall and compared him to a setting sun: "Ah, Richard! [... ] I see thy glory, like a shooting star, / Fall to the base earth [... ] Thy sun sets weeping in the lowly west" (2.4.2). Translation: Richard is totally going down, and his power will be short lived.
As we know, though, even after a setting sun goes down, it always rises again. In this case, Richard goes down, but the newly crowned king Henry IV rises in power. Richard says as much after being stripped of his crown:
O that I were a mockery king of snow,
Standing before the sun of Bolingbroke,
To melt myself away in water-drops! (4.1.8)
Translation: King Henry IV is as powerful as the blazing sun, and poor Richard is now just some poor chump who feels like he's going to "melt away" (cry and/or disappear and be forgotten) under the new "sun's" rays.