If you ride the Coast Starlight northbound from California to Oregon, you travel through the Cascades between Dunsmuir, CA and Chemult, OR from 4:30 to 9:30 in the morning. You can wake up and watch the sun rise over the snow-capped mountains.
Southbound on the same route will put you between Eugene (5:00 PM) and Chemult (8:30 PM) in the evening. Depending on the time of year you may or may not get to see sunset in the mountains at that point.