Briefly, upper arms and legs need to be covered for men; hair, arms and legs for women - and clothing shouldn't be too tight. Clothing with profanity on it is also a no-no. I wore cotton trousers and a long-sleeved cotton shirt and had brought a scarf with me and this proved to be entirely acceptable. (I'm frowning with the effort of photographing myself.)
BUT, but, but, if you turn up not wearing suitable clothing, Sheikh Zayed Grand Mosque will supply you with a robe to put on over your clothes (I imagine this is not the case with smaller, less tourist-friendly mosques, however).
You will be required to take off your footwear before entering the mosque proper. I also noticed one couple who were being photographed by a friend (not a problem) being politely asked not to touch inside the mosque.
Apart from that, the same rules apply as when visiting most places of worship: be respectful and think twice before photographing people at prayer.