Before my wife and I went to Marrakech, we assumed that female tourists would be covered up and would be respectful of local religions, however after getting there, we were extremely shocked by how little many of the female tourists were wearing.
Some of them were wearing so little, that it actually made 'me' feel uncomfortable - they were wearing less than what girls would normally wear in the UK!? I was surprised that locals didn't seem bothered. I certainly never saw any of these girls getting any problems or harrassment whatsoever whilst I was in Morocco (we were there for several weeks) - it seems to be totally accepted by the locals.
We did see plenty of local women wearing very western clothes which were sometimes tight or revealing, however, it was definitely the female tourists mainly who seemed to be showing the most.
Also - in places like Essaouira there were plenty of female tourists wearing almost nothing on the beaches and with everything hanging out and on display - was pretty shocking and seems to be accepted as normal. It was nothing like how I imagined things to be in Morocco.
Morrocco is very strange - one second you are in the old medinas hearing the call to prayer, with women covered from head to toe walking past you, then the next second there are women walking around practically naked...
Only in Morocco I guess.
My advice to people is to use some common sense really and not to stress over it too much. It's completely fine to wear normal western clothes and you're not going to get any problems doing so to be honest - the place is completely overun with western tourists and the locals are totally used to it. Saying that however, I was honestly embarrased by what some tourists were wearing - they seem to be asking for trouble.
Personally I think it's best not to draw too much attention to yourself and to try and blend in (normal western clothes are fine for doing this). I think respecting local religions and cultures as much as possible is important and can only be a good thing - what shocked me was that there are tons of tourists in Morocco who seem to wear hardly anything and have no understanding or appreciation for local culture or religion at all. Some of these people would honestly be stared at in western countries and I have no idea what they were thinking...
From what I saw whilst I was there, Moroccan people are extremely tolerant towards western tourists and I don't think people should worry too much.