The short answer
From about five or six, children get the most from Marrakech: old enough for a camel ride, the souks, the acrobats on Jemaa el-Fnaa and a desert night sky they will remember. Toddlers do well too, based in a calm courtyard riad with shorter days. Teenagers tend to love the contrast of souks, hammam, desert camp and mountains.
In more detail
There is no wrong age, only a different trip. Under-fives are welcome everywhere, but they get less from the camel ride and the medina footwork, and the long drives to the Sahara are hard work for them. With a baby or toddler, base yourself in Marrakech, choose a riad with a pool and keep each outing short: a Palmeraie camel amble, the gardens, a morning in the Ourika Valley.
Roughly six to fourteen is the sweet spot for a full Morocco loop. Children of that age can manage the Erg Chebbi camel ride to camp, which runs about 20 to 40 minutes, enjoy the Atlas Film Studios at Ouarzazate and walk the ramparts at Essaouira.
Teenagers often rate Morocco among the most engaging places they have been. They tend to lock onto the history and the photography, and they are old enough for a hammam, a cooking class, a quad ride in Agafay with an operator that allows their age, and a proper walk in the Atlas.
Whatever the ages, the season matters more than the birthday. Avoid July and August inland, when Marrakech pushes past 38°C. Spring and autumn are the family windows.
