The average temperature in Morocco is 63°F (17°C), with minimums around 45°F (7°C) in winter to above 80°F (27°C) in summer (and significantly hotter in the desert). Unless you visit in the sweltering heat of August or the biting cold snap in January, you will most likely need to pack for a range of temperatures. It's especially important not to underestimate how incredibly cold it gets in the mountains, where indoor heating is scarce. If you expect to hike and camp, pack all your gear, including a 0ºF sleeping bag. The Atlantic coast is cooled by fresh breezes, even during the summer months.
Crucial items to bring to Morocco include sunscreen, walking shoes, and for women, a large shawl or scarf (to be wrapped around your head or arms for respect or your shoulders for warmth), a French and/or Moroccan Arabic phrase book (in the countryside many people will not speak French).
Don't expect to find soap, washcloths, or towels in budget hotels, nor toilet paper in most bathrooms; it's smart to pack your own, including tissues, hand sanitizer, and pocket-sized baby wipes for convenient hygiene. Tampons are rarely found in Morocco, so it is best to pack those, too.
Casual clothes are fine in Morocco; there's no need to bring formal apparel. Everywhere but the beach, however, you'll need to wear trousers or long skirts rather than shorts; tank tops, short skirts, and midriff-baring shirts should not be worn.