Most people will say to mill the grain always right before you brew. But in my experience since I do not have a grain mill, yet. As long as you keep the grain stored properly, even in a crushed state, it will stay for a long time. I had, due to circumstances, kept some crushed grain for over 6 months. It was still good and produced beer that was just as good as fresh ground grain.
The little trick I've started to do is to actually taste your grain. I know it's not the best thing to chew on but you will be able to taste it and get a sense for what makes a fresh tasty grain and what doesn't. You can also taste if the grain is going bad because it will be like an old cracker, gets that stale taste in your mouth.
So proper storage is key and everyone's environment is different. Cool and dry is the best. But don't keep in a fridge with your other food, it will absorb flavors from the other food in the fridge.