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.