Both cities are definitely worth a visit. I'm based in Hamburg so if you would like to meet (and I'm in town) I could play the tourist guide for a few hours.
From the main train station you can do an extensive walking tour.
Sights include: Moenckebergstrasse, the Alster, Karoviertel, Schanzenviertel, St. Pauli, Landungsbruecken, Fischmarkt, Speicherstadt (historic part of the harbor with storage facilities). As mentioned by Zeehe the boat trip is also nice. Minatur Wunderland is bound to open a Hamburg airport model later this year:
http://www.youtube.com/watch?v=dM7oXKmYiGU