Smoking does it... yeah.. uhhhh riiiight.... ever seen the old Apples from gradeschool classrooms? Yeah... six year olds that smoke.
Not only does smoking yellow the hell out of a case, it makes the computer stink too, and it's REALLY hard to get the smell out.
It just so happens that sunlight and about 50 other things can yellow a case as well. Usually not as well as smoking though.