Is it dangerous to go to Morocco?

No, it's not dangerous to go to Morocco as long as you observe the normal safety measures (not go out late at night alone to unknown places, etc.), then you'll be fine.

Here's a question for the asker "is it safe to be on your neighborhood around 3am)