As part of their diet, chickens can have grains at any age, if the size of the grain is appropriate. For young chicks, it needs to be ground quite fine. Adult chickens can eat whole grains. Somewhere in between, the grain just needs to be cracked or ground. Adults do digest cracked, crimped or ground grains more easily and thoroughly than whole grains. A good guide, if you're not sure, is to look at the size of the crumble or pellet they can eat. They should be able to eat grain that's the same size.
Don't forget to provide grit, once they are eating anything other than crumble or pellets.
Scratch is good as a treat, to keep them warmer at night in the winter and to give them something to do when it's scattered around. It's not a complete diet, as it is lacking in protein, vitamins and minerals. Basically, it would be like a person eating nothing but cereal, without the milk, for every meal. There are ways to provide protein, vitamins and minerals, but you need to do some reading. It you are only giving scratch as a treat, then you don't need to worry about it.