Why do plastic cases of old computers turn yellow? Is this yellowing a problem that has been solved in modern plastics?
In this article, it states:
In nearly every case it’s flame retardants. Although plastics can yellow in the absence of flame retardant chemicals, the chemicals accelerate the process when exposed to heat, oxygen, and ultraviolet rays.
The process of the plastic reacting with the heat, oxygen, and UV rays makes the plastic yellow. Flame retardants (very common in old computers) will only speed up the yellowing process. It could be any UV light, not just the ones from the Sun. Heat made from the device itself plus some poor choices can also make your plastic a nice yellow:
The plastics used in early Super Nintendo units, however, had a terrible flame retardant mixture that yellowed as a result of the oxidation caused by the heat of the machine itself (let alone any heat in the environment).
Using new formulas, the process can be slowed down, but not necessarily stopped completely. You can always try to remove the stains though, chemically or physically:
Some people use ultra fine sandpaper or melamine sponges to sand away the very surface of the plastic and remove the yellowing. This works for very light yellowing and plastic types where the yellowing hasn’t penetrated very deeply into the plastic. Unfortunately it only works by removing the actual yellowed plastic...
The other method, chemical removal, relies on using bleaches to attack the yellowed molecules in the plastic and restore the color. This method is best for very old and very yellowed plastic as it gets right into the structure of the plastic and does a very thorough job.
Assuming the yellowing isn't caused by nicotine, if you're a smoker, usually it's because of UV light interacting with flame retardants (usually bromine) in the plastic of the device's case. UV exposure can be from sun or fluorescent lights - the yellowing plastic isn't picky about the UV source.
I'm not aware of it being solved in modern plastics.
As has been mentioned already, the most common reason is flame retardants.
I've found that the easiest way to restore the original color is hydrogen peroxyde + UV light (either from the Sun or from an UV lamp).
Some time ago I restored an MSX turbo R and documented the process, including whitening the case and keyboard. Here's the link.
Degradation may be initiated or accelerated by numerous factors including ultra-violet light, visible light, ozone, pollutants, manufacturing additives, oxygen, heat, or by carton storage without protective liners.
As mentioned in other answers, one of those "manufacturing additives" is flame retardants.
Also, make sure the storage room is well ventilated, especially if it's in a basement.