The major reason for using white ball in ODI and T20 is that many of those matches were happening as Day & Night matches and it was very difficult to spot the red ball under floodlights. Cricket balls were traditionally red and test matches still use that(Compared to red ball, white balls deteriorates more quickly and hence red balls are more suitable for test matches).
From Cricket ball Wiki:
Cricket balls are traditionally dyed red, and red balls are used in Test cricket and First-class cricket. White balls were introduced when one-day matches began being played at night under floodlights, as they are more visible at night. Professional one-day matches are now played with white balls, even when they are not played at night.
This was one of the reasons why the player's dress color was changed from white to colors so that the ball can be spotted very easily in ODIs and T20s.
There was also an attempt to experiment with some other colors as well as...