Sending samples to a lab will give you exact protein and TDN measures. Failing a lab, good hay smells and looks good. The best grass hay is usually silvery green in color. Brown hay was probably cut too late or dried too long, and will be lacking in vitamin E and other nutrients.
Green hay is too wet to store in a barn.
It can be fed out immediately, but in a barn it will rot, mildew, or possibly start a fire. Sheep and goats find alfalfa hay more palatable if it is not too stemmy, and especially if the stems have been crushed with a haybine or conditioner. When hay is curing in the barn, you can and should test it by putting your hand deep inside bales. Before you bale hay, pick up a bunch and twist it tightly in your fingers. If it feels wet when you twist it, it is too wet to bale.