They had been trying to court his lady, they had eaten his livestock and taken advantage of his property. Even though the suitors were ready to pay him back and make retribution for what they had taken, Odysseus wouldn't hear of it.
Plus, Tiresias had commanded him to kill all the suitors, go a ways inland and build a monument to Lord Poseidon.
So I think you could say two of his reasons were to avenge them for their behavior and to be obedient to the gods.
In my opinion, Odysseus kills all the suitors because they are trying to take away what is rightfully his. This would be a great concern to a person today, but to a person from Odysseus's time and place, it would be even more of a big deal. To him, the actions of the suitors would have been an affront to his honor.
The suitors are trying to take away his home and his wife. They try to kill his son. They are trying to destroy the things that would be most important to a Greek warrior/aristocrat of the day.
The final bloody showdown at the end of Homer's The Odyssey consists of Odysseus ruthlessly murdering Penelope's suitors. He shows them no mercy, while also having Athene on his side to aid him in murdering all of them. Athene also deters the angry mob of the suitors' relatives after the massacre. With everything back to normal, Odysseus is reunited with his family. But why would he relentlessly murder all of the suitors?
The suitors are taking all that is Odysseus's. They are living on his land (and making a real mess), eating all his livestock, treating his servants poorly, and moving in on his wife. Also, Odysseus has spent years on this treacherous journey home only to find these men taking advantage of all that is his. He has no remorse and little reason to offer them mercy, not to mention the Gods are on his side as well.