Like most chemicals, store them in tightly sealed containers, at room temperature, and for items that are photoreactive like silver nitrate, use a dark glass bottle or store them in the dark.
That said, I had a bottle of silver nitrate that I bought in the late 70s, and it had a hard life (I did not store it in the dark but it was in amber glass). I tried to make an emulsion out of it this last summer, and the silver nitrate did not fully dissolve. It had what I believe were reduced flecks of silver in it which of course, did not dissolve. Adding ammonium hydroxide did not help either, the metallic silver flecks still remained.
Now there are probably bottles of silver nitrate older than that which are still good, but you need to know you are taking a chance with older chemicals, and the bast approach is to test a portion and see what it looks like dissolved.