Melee is good if you're bad at dodging and like being direct. It has a lot of variety (up-close weapons like Starlight or Fetid Baghnaks, medium weapons like yoyos, ranged weapons like Storm Spear or boomerangs). You have the most weapons to choose from and flasks last forever giving big buffs. With no ammo, mana, or minions to worry about, it's the simplest class to play.
Ranged is good if you like to 'prep' for fights. If you don't mind making a bunch of ammo over and over and farming for accessories (like magic quiver or sniper scope), this is a great class, and its the good ammo that makes it so strong. You can keep your distance in fights, they have good armor (second best defense in the game). They have a 'safe' strategy for every boss, and most people who do no-hit Moon Lord runs do ranged.
Mages have a lot of power but you have to be able to multitask. You have to keep an eye on your mana (through potions and mana sickness or regeneration potions or celestial cuffs/mana cloak). To maximize your potential, you often have to switch weapons (I often use Nimbus Rod, Rainbow Gun, Clinger Staff, Magnet Sphere and a main weapon). You also have to dodge pretty well while handling all this.
Summoner seems like it would be the least work of all the classes (your minions kill them for you!) but it has a lot of different playstyles and most of them are fussy. Whips require getting up close and personal with little defense, so dodging skills are crucial for this playstyle. Devs have said that Summoners are supposed to use the strongest available weapons from other classes to (that's how DPS was balanced), but since you don't have specialized armor your Daedalus Stormbow or Terra Blade doesn't contribute as much DPS. Even if you just fly around and let minions attack, it leads to long fights and you still have to pay attention with some minions so they don't get stuck.