right now it's style. In the past teas wore some colored pants.
Phillies and Cardinals had light blue pants as did the Royals and Brewers often for road games. Light blue is in actually allot of teams' history as their road unis. (70's-and into the 80's)
The White Sox wore Navy Blue Shorts in 1976 for 3 games.
The NY Giants wore solid Black for the 1905 WS and again similar all black in 1911.
The Indians had red pants with red shirts in 1975
I am certain there are others.