You do not need to kill all of the Divine beasts, but It is a good idea to do it for 2 reasons. First is that you will get a unique ability for killing each one of them. Some are better than others, but I used Revalis Gale to get past a lot of enemies on the lead up to the castle door. The second advantage is a bit of a spoiler, so beware!
Minor Spoiler Ahead - When you kill a divine beast it will shoot a sort of laser over to the castle. When you begin the battle with Gannon, these lasers will all hit him and damage him. I entered the fight with all 4 beasts killed and it took away half of his health. It is a tough enough boss fight, so having half his health gone was a major advantage.