In the first act of "Hamlet," Horatio and the others speak of the late king who slay Fortinbras of Norway. As a result of his death, Fortinbras forfeited all the lands he had seized to his conqueror, King Hamlet. Now, Denmark is in danger as the son, young Fortinbras has gathered an army--"a list of lawless resolute" (l.98) and seeks to regain these lands. Bernardo wonders if this imminent danger is the reason why the ghost of King Hamlet has appeared and may again appear to instruct them.
In Act I, we're brought up to speed on what is rumored to be going on in Denmark. A huge military buildup is underway, with bronze cannons being manufactured, weapons bought from abroad and so much shipbuilding occurring that the laborers are working seven days a week. Horatio explains that rumor has it that Fortinbras, the son of the King Fortinbras the late King Hamlet killed, is marching on Denmark, determined to avenge his father's death. This parallels Hamlet's quest to avenge his own father Hamlet's death on a larger scale. Thus, vengeance is everywhere. We also learn from Horatio, who references Roman times, that ghosts are a portent of danger. Later, in scene iv as the men again await the ghost, we hear from Hamlet that Claudius spends his nights drinking and dancing. Hamlet mentions that Denmark has a bad reputation as a place of drunkenness.
This talk adds a sense of menace and foreboding to the play. With the country soon to be at war, it is easier to understand that Claudius and Gertrude would be all the more upset at Hamlet's seeming madness.