In big formal events such as a wedding, charity dinner party etc, men always wear identical tuxedos or suits of black and white, while women wear dresses of different designs and colors. Why is that? Looking at paintings of 18th century parties, the men, like women, all wears formal clothings of various style and colors. Is there a reason for the dress code to change among men?
The big change from the 18th to the 19th century has quite a few influences. First, the big reason for wearing anything but black earlier is the fact that events, all taking place inside at night, were only lit by candle light. Anything that isn't light, bright, and often sparkly will disappear into the shadows. In the 19th century this changes with things like gas and electric lighting. Now darker tones are a viable option.
Some of the popularity for black also has to be attributed to Queen Victoria's mourning. The popular colors for menswear varied a bit more prior to the 1870s, brown, navy, dark green, burgundy, grey, etc all being acceptable for any situation. Note that the evening wear in this fashion plate is not the all black suit. Light-toned trousers with a dark coat was also a fashionable ensemble from the very beginning of the century. Once we reach the 1870s, black jacket and black trousers for evening is standard (Prince Albert died in 1861).
There are a lot of other major cultural changes occurring during the middle of the 19th century that likely had influence as well. The developing Victorian attitudes of polarization of masculine and feminine, restriction of excesses, morality, etc cannot be ignored as a potential part in any alteration of appearance.