It's better to avoid walking alone at night. Especially in the suburbs of big Moroccan cities. Make sure you know ahead of time where you are going. One of the typical scams that you might encounter as a solo woman in Morocco is the “nice guy showing the way”.