You might wonder if refrigerating cookie dough prior to baking matters. Well the answer to that question is yes. There are three things that chilling cookie does for a recipe: It controls the spread of the cookie, concentrates flavor, and changes the texture.
Controls the Spread:
Chilling cookie dough before baking solidifies the fat in the cookies. As the cookies bake, the fat in the chilled cookie dough takes longer to melt than room-temperature fat. And the longer the fat remains solid, the less cookies spread. Also, the sugar in the dough gradually absorbs liquid. If you bake the dough immediately, before sugar has a chance to absorb much liquid, that liquid remains “free” in the dough, and promotes spread.
As the dough chills, it gradually dries out, concentrating the flavors of all the ingredients. Think of watered-down lemonade, vs. lemonade with less water: dull flavor vs. bright, tangy flavor. Same with cookies.
Something else happens as the dough rests: part of the flour breaks down into its component parts, including a simple carbohydrate, sugar. So, since sugar is a flavor enhancer, the cookies may taste more flavorful, as well as sweeter.
Changes the texture:
It’s not really all about the chilling, but the dough gradually drying out, that’s responsible for texture change. The drier the dough, the more concentrated the sugar. And a higher percentage of sugar creates cookies with chewy/crisp (rather than soft/doughy) texture.
Side Note: Chilling cookie dough for 30 minutes will give you the best results.