We don't use saffron that often. The last batch we got went stale. Is there anything I can do to preserve it for longer? (For example, our spice rack gets a lot of direct sunlight, is that bad?) How long can I expect it to last?
Use common advices: closed jars, in a fresh and dark place (a bodega is wonderful for keeping the spices).
Direct sun is one of the worst enemies.
And when everything else fails, consume it ... f.ex. this very simple recipe, just rice + veg stock + mushrooms + garlic + persil + saffron
There are special glass jars made to protect herbs from damaging uva/b rays, proven to maintain freshness. Granted, these little jars are designed for a "different" kind of herb, I, on the other hand, use them for my ultra expensive, direct from the middle east saffron. Keep an open mind and enjoy your saffron!!!
You can keep it in the freezer. It will probably keep for a really long time, if wrapped well and kept frozen.
Spices in general can be stored in the fridge or freezer for a longer shelf life - just like most other foods. You will want to be sure to wrap very well and make sure the container is good, since it will be a problem if condensation accumulates in the container. And whole spices will likely hold up better than ground.
As for saffron specifically, my parents brought back a huge thing of saffron from when they were in turkey years and years ago, and they kept it in the freezer - and it's still good, it smells strongly and flavors well when warmed up and isn't stale or anything. They use saffron often enough (for traditional Indian desserts) to keep a small amount in a jar in the spice rack that they could use when needed that could be refilled from the larger container, so the large container isn't exposed to temperature changes every time they want a pinch. For me, since I have a tiny little flat container and use it infrequently, I keep the whole thing in the freezer - it doesn't take long to grab a pinch out anyway, so it doesn't warm up too much -and it's still probably better stored than keeping it in the cabinet.