Though I am by no means an authority on clothing in the Middle East, I spent most of my childhood in the United Arab Emirates, where the local men wear white, and the women black. I'm aware that this is not by any means demanded by Islam, and it isn't my intention to provide some sort of comprehensive analysis of these matters... but it did often cross my mind to wonder why, exactly?
Several ideas surfaced in various discussions on this topic, which were always fascinating and quite broad minded, especially given that my Muslim friends who actually wore the traditional dress were as clueless as to its origin as I was. But of these ideas, several main theories became our established favourites, so to speak.
There was of course the suggestion by my hardcore Christian friend, whose usually tolerant and cosmopolitan attitude towards Muslim culture seemed conspicuously absent in this area. He was convinced that, since white was easily the more comfortable* of the two choices, it must be the brutally sexist and indescribably unfeeling views of the prejudiced muslim men, forcing their docile womenfolk to suffer in the heat*. After failed attempts to make him 'see reason', we moved on.
A physics teacher of mine had a slightly more plausible idea. He reasoned that, in most early societies, it was the norm for the men to do the hunting, fighting, exploring and other such tasks, while the women hung out in the shelters, doing the washing, cooking, child-rearing and socialising. This, in the context of the Middle East, would put the men in ths sunshine, and the women in the shade. For these purposes, white is the most comfortable for men, and black for women*.
This idea made sense, and we considered the discussion resolved, that is, until it was brought up in conversation with a researcher/writer guy I know. He had a very appealing explanation... and it went something like this:
In days of yore, the cloth was, as default, white. So all clothing in the area would be white, or a shade thereof. The men, being (for the most part) rather practical, and spending their days doing menial, practical tasks, were (for the most part) content to wear this shade. The women, who (forgive my generalisation) seem to be more interested in the social scene, wanted to liven up their garb - so they invested in dyes. The dyes in the area were all a sort of deep purple, and were quite costly and hard to obtain. As such, most women could only afford to dip their clothing in the dye once, or maybe twice... producing a rather pale tone. The more wealthy you were, the more dye you could afford. Your clothing would be correspondingly richer in hue... eventually becoming more or less black. So black clothing amongst women would have become a kind of status symbol, which eventually became a tradition.
If anybody else has a theory, or (heaven forbid) knows the facts well enough to be properly autoritative, I'd be very interested to hear from them.
* It is helpful to understand the implications of these two 'dress codes'. As every physics student knows, white gloss surfaces absorb heat the worst, and reflect it the best. Matte black is the opposite - it easily absorbs heat, while being particularly bad at reflecting it. Anybody who has ever stood in the hot summer sun in a desert environment wearing black shoes will back me on this - it's like having your own personal pressure cookers for your feet.