Blue replaced tan. When I was a kid, you had red, yellow, tan (some said orange), green, and brown. In the 1990s, they retired the tan one and replaced it with the blue one. I'm not 100% sure it was done at the exact same time, or if there was a gap between the two changes.
What I recall hearing about it at the time was that the blue dye was previously considered unsafe to consume, but they found a way to make it safe. They were set up for only so many colours, so they dropped the tan one as they already had a brown one.
As to the picture posted below, green M&Ms were always a sexual reference. Giving someone a green M&M, or a handful of only green M&Ms, meant you liked them. That's (probably) why they made the green M&M a sultry female.