Personally, I think what colors you wear when is a matter of taste and fashion rather than etiquette, but some people think it’s actually rude, so here we are.
The traditional period for wearing white was Memorial Day through Labor Day (with some municipalities allowing a brief wearing of white for Easter and then packing it away again until Memorial Day.) The reason is is that Memorial Day through Labor Day marks the effective “summer” period. Back in the Victorian era where many of etiquette and social customs were formalized, rich people would leave their houses in the cities and go to the country homes for the summer months. In town, everyone wore very serious, dark, heavy clothes, but in the country they would wear nice, light, white clothing which was more comfortable during hot weather (and remember, there was no A/C back then!) When they returned to the city after Labor Day, they would put their summer clothing away and return to their more formal city clothes. Also, back then, city streets were full of mud and horse poop and garbage and the air was full of coal smoke and soot and all kinds of things that made wearing white extremely impractical. So it just kind of stuck and became codified into this “rule.” Also, as New York was kind of the center of the fashionable world, rules were made to follow the Northeastern climate where it didn’t really start to get hot until Memorial Day and it cooled down quickly after Labor Day.
Nowadays, it’s totally fine to wear white whenever you like, especially if you live in a climate where a sundress is perfectly comfortable in March. The fashion industry even has a thing called “winter white” which is white you can wear in the wintertime. Now of course, you might simply find it more practical and comfortable to put your more summery whites away in the winter, but nothing is stopping you from wearing white linen pants in January if you want.