White and brown sugars can be swapped without fuss in any recipe where the chemistry isn't important.
Sugar is an active participant in every recipe.
In recipes that involve baking soda, the primary role of acidic brown sugar is to react with sodium bicarbonate and produce carbon dioxide, making cookies thick, puffy, and soft (cakey at first, then crunchy if they continue to bake). Neutral white sugar can't participate in that reaction, so cookies are comparatively thin, dense, and crisp (chewy if kept from browning).
In recipes that call for creaming butter with sugar until light and fluffy, the primary role of sugar is to assist in mechanical leavening. In that role, white sugar aerates the dough when creamed with butter for thick and puffy cookies. Brown sugar, meanwhile, is dense and compacts easily, creating fewer air pockets during creaming—that means that there's less opportunity to entrap gas, creating cookies that rise less and spread more. With less moisture escaping via steam, they also stay moist and chewy.
In recipes that involve soft or melted butter, sugar can play a critical role in gluten development by acting as a tenderizer, but white and brown sugars aren't the same in that regard, either. White sugar, with its neutral pH, interferes with gluten development, allowing the dough to spread more before it sets. The result is cookies that are thin and tender/crisp. Acidic brown sugar, on the other hand, speeds gluten formation and egg protein coagulation, so the dough sets quickly, making cookies thick and tender/chewy.
Things get more complicated when sugar is playing multiple roles.
When recipes call for all white or all brown sugar, it's to achieve a specific effect.