I've heard that you can revitalized lumpty or hard brown sugar, but also that doing so doesn't recover the actual flavor. Does baking with other brown sugar that is "revitalized" really impact cookie flavor? What about white granulatd sugar?
Brown sugar is a bit different. It gets hard simply because it loses moisture - i.e. the water evaporates - and that won't cause the taste to change. However, some people have reported brown sugar actually fermenting on its own (also here). This fermentation is more likely to happen than in white sugar due to the presence of molasses.
It takes a long time for fermentation to occur, but it can definitely occur, and that will most certainly change the flavour. I'm not sure if I'd call it "losing" the flavour; some might argue that the presence of alcohol is a good thing, although fermented sugar obviously will not be as sweet.
I would not worry about the flavour of brown sugar that has merely hardened; if it smells like alcohol, though, you might want to be more careful.
I make my own brown sugar after reading a recipe substitution and then checking the box of brown sugar I had on hand. I found the contents were: Cane sugar, molasses. I have been making it about 10 years now. The molasses is what give it that carmel like flavor.
RECIPE: I put about 2 cups of regular white cane sugar into my mixer bowl and drizzle about 1 Tablespoon of unsulphured molasses into the sugar while the beater is moving. I add the molasses to the mixing sugar until it is either light or dark, depending on what I need. Store in airtight container.
This has never failed me and it is does not require an exact measurement. Adding a little drizzle at a time to taste is how I achieve what I am looking for in my own brown sugar. Keeps well.