Another good and gentle product for whitening is Bicarbonate of Soda (I think it's just called Baking Soda in some countries?). You can either make a solution of it for soaking, or make a paste with a little water and apply it to badly yellowed areas (I've used that technique successfully on antique cotton night dresses for the yellowed collars and cuffs), then leave it for a few hours and rinse off.
And yes, sunlight is also great.
Ruth