Hamlet's father was murdered by his brother Claudius while he was sleeping in the garden one day. Sneaky Claudius crept up to King Hamlet and poured poison down his ear, killing his brother and ensuring that he would take his place as king of Denmark. In carrying out this wicked act, Claudius was motivated by nothing more than ambition; he coveted the throne and so murdered the present occupant in order to get his hands on it. It is Claudius's greed, ambition, and covetousness that make his killing of King Hamlet especially unjust.
Towards the end of the play, Laertes is killed by the poisoned tip of a sword which he himself had poisoned and with which he'd hoped to kill Hamlet to avenge the death of Ophelia. On the face of it, one might think that Laertes got what was coming to him. But he was driven on to seek revenge by the evil Claudius, who wanted Hamlet out of the way but wasn't prepared to get his hands dirty in the process. So he constantly egged Laertes on to do what he was too much of a coward to do himself. In that sense, one could argue that Laertes's death is unjust because it's the direct result of his being manipulated by such a devious, wicked individual.