Ghost shrimp turn white because they are dying. Bacterial infections, parasites, and other health conditions are all common causes of color change in ghost shrimp. Color changes can also be a reaction to stress or suboptimal water parameters. Lastly, if you’ve had your shrimp for a while, they may be turning white because they’re dying of old age.
Additionally, molting can cause their color to change from clear to cloudy white. With that said, molting shrimp wouldn’t appear white all over. If they’re just molting, you should be able to see an identifiable split in the middle of their shell.