After the king and queen exit in scene two (after the king has berated Hamlet for his continued mourning and grieving his father), Hamlet says, of the world,
'Tis an unweeded garden
That grows to seed. Things rank and gross in nature,
Possess it merely (1.2.139–141).
He uses a metaphor to compare the world to an overgrown and disused garden, almost even alluding to Eden, the Garden of Paradise, after Adam and Eve's fall from God's grace as a result of their original sin. To Hamlet, Denmark—and the world—seemed a paradise when his father was alive. But now that his mother has remarried (so soon!) and married her own brother-in-law to boot (gross!), Hamlet feels that paradise has ended and everything now seems decayed and rotten.
As if to echo a similar sentiment, Marcellus says, "Something is rotten in the state of Denmark" (1.4.100). In response to seeing the dead king's ghost, armed and dressed as if prepared for war, the castle guard worries that things are unwell in the kingdom—and he is right. The idea that something is "rotten" certainly conveys this through a theme of decay or corruption.
The dead king's ghost also calls his murder a "Murder most foul . . . strange and unnatural" (1.5.33-34). This description also conveys corruption, the decay and disease that must reside in the heart of the man who committed this murder: the king's own brother, and his widow's new husband, Claudius.
Horatio also refers to decay and disease the first time he sees the ghost. He compares it to when Julius Caesar was killed, saying that there were
Disasters in the sun; and the moist star,
Upon whose influence Neptune's empire stands,
Was sick almost to doomsday with eclipse (1.1.130–132).
He describes the moon (the "moist star") that controls the ocean's tides as "sick" because it underwent a terrible eclipse. All of these references certainly affect the mood of the play —one cannot continue to discuss illness and rottenness and decay and corruption without doing so—and they seem to foreshadow that Denmark will not recover from its "illness" until all of the corruption in the heart of the Danish court is excised.