We've been to CT twice (2008/12) and Amalfi Coast last year.
CT is of course the 5 villages with the hiking trails between each (if they are all open - sometimes they are closed because of land slides)...nice little villages - not a whole lot to do other than to hike, lay on the beach or relax. If you don't want to hike between the villages, trains are plentiful...we stayed in Corniglia both times, because I like the more off the beaten track places. Most people recommend Vernazza or Monterosso.
Amalfi Coast is way more spread out. And a decided lack of trains (as in...none) - you need to use a bus (or rent a car - and the bus ride had my nerves on high alert - I personally would never drive it, but lots of people do - they are braver than me!). There are also ferries...we didn't use them so no comment. You can do hikes as well (we did a hike from Ravello - which was my favourite spot - to Atrani - the little village we stayed in just minutes away from Amalfi...and there are other hikes as well). I do want to go back someday and would be hard pressed to decide whether to stay in Ravello or Atrani. A lot of people recommend Positano or Amalfi (again - I like the off the beaten path places, hence Atrani). It is nice to stay right by the water, but Ravello - up in the hills - had breathtaking views. Other people like Sorrento - a lovely big city, not technically on the Amalfi coast, but well situated for day trips to Pompeii and Positano and beyond.
Either place will be crazy busy in the summer. (we did CT mid Sept, and Amalfi early Sept).
I am hard pressed to pick a favourite (OK, my fav is Venice but that doesn't count). It's like trying to decide if I liked the south of France better than the North of France. South was a little flashier, North had lovely quaint spots (my opinion). I will say after travelling to the CT twice (only 4 nights over the two trips) I think we've had our fill. We spent 3 nights on Amalfi Coast, and I could honestly see myself going back for a week as we really only scratched the surface.
I think a big part will be where else are you going to be...if you are going to do the Rome-Florence route, CT would be better, as Amalfi is going to be out of your way. And how many nights can you give to each - if you have only 3 nights to spare, (for me) that would be fine in the CT, but I would want to dedicate at least 4-5 nights to Amalfi - so much to see, way more spread out. Gun to my head, if someone could only see one, I'd say Amalfi...