I visited Morocco for a Geocaching long-weekend at the end of the summer in 2009, visiting Casablanca for 2 days, and Rabat for 1, before returning to Lyon. I used trains and my feet to get around (see below for practical tips).
There isn’t much of a reason to go to Casablanca, unless you’re on business or are using cheap easyjet flights to get there. Once there, I’d recommend the guided tour at the Hassan II Mosque, eat at La Sqala then go for a drink at Rick’s Cafe.
I stayed at the Sheraton, but only because I had some Starwood points that needed using…
Staying safe - there’s some good info on staying safe the Casablanca wikitravel page
Rabat is a much nicer city than Casablanca, with a few more tourist attractions. I stayed in a great Riad right in the middle of the Medina - the Dar El Kebira (not particularly easy to find - but go in from next to the Kasbah - and follow the map on their website - or use GPS N34 01.693 W6 50.156).
The Kasbah des Oudaias is a great place to spend an hour or so, and don’t miss the cafe for a tea stop. Rabat’s medina is also good for Medina novices - not being quite as manic as some. The Hassan tower is quite dramatic, and close to the mausoleum of Mohammed V. If you’re the sort of guy that likes old stuff dug up from the ground, then the Musee Archelogique is worth a quick look, but the ancient standing remains at Chellah should be visited first.
GPS maps (for garmin handheld devices) are best found by grabbing the OSM data for Morocco from cloudmade; or by extracting the latest info from OSM using josm, converting it to a Garmin .img file with mkgmap. There’s a slightly more informative set of instructions available on my geocaching page.
Trains - The train service looks good, and by all accounts fares are cheap and the trains look efficient. For my purposes there are trains from underneath the airport (Mohamed V) into Casablanca (Casa Voyagers). From the airport, you can also get to Rabat, with one change. The ONCF website provides all of the details for routes, times, and prices.
Power - is standard Euro type 2-pin plug.