Confusion / Seed Bomb is very solid for gym defense. The reason Psychic is a better move for D is that most people who attack into Exeggutor do so with pokes that resist grass moves, like Dragonite / Arcanine, or big pokes like Snorlax. People aren't usually going to attack into Exeggutor with a water / rock mon - or anything else weak to grass moves - so having two psychic moves is good against most attackers.
That being said, Seed Bomb is a low energy move that the defender can basically spam against an opposing attacking mon, and it's more difficult to dodge all of them. Depending on the pokemon level / IVs, I would consider powering this guy up for gym defense.
Seed Bomb isn't as good as Psychic, but for defense purposes it's far superior to Solar Beam, which is an easy dodge.