This applies to brown sugar, and also “natural” brown sugars such as Demerara, Turbinado, and Muscovado/ Moscovado.
Once you remove brown sugar from it’s original plastic wrap, the sugar will eventually get dry and hard over time, even if it has been placed in an sealed container. It makes measuring out sugar difficult.
Fix this by placing a slice of bread in the sugar container. After a few hours, the bread will dry out, and the sugar will be usable again.
The same trick applies to dried out cookies.
On the other hand, sometimes you need very dry brown sugar, like when you are caramelizing it on top of custard. In that case, measure out the amount you need the night before, after the custard has been placed in the fridge.
Leave the sugar out in a bowl overnight, and the next day when you are ready to caramelize it, put it in a plastic baggie and crush with a rolling pin.
This way, you will get the delicious taste of brown sugar, but it will be totally dry and caramelize much easier.