I have a bag of brown sugar that I never noticed in my cupboard, and I needed it for a cookie recipe that I decided to make today. The brown sugar has been there for about a year, and it looks really packed together. Is it safe to use?
Being packed together is typically safe to use, just inconvenient. Brown Sugar doesn't really "expire." However, it can absorb excess water if stored in a humid environment and lead to bacteria fermenting it (It would have an alcohol style smell and turn goopy) or pick up odors from its packaging or things that are nearby. For example, if it's stored in a musty basement in just a plastic bag, it can pick up a mildew type smell. If near strong smelling spices, it can pick up odors from those.
The most common issue is it just dries out though and clumps or turns hard. You can usually loosen it by just warming it up and moving it around. Try gently massaging it in the bag to use your body heat or break it in to pieces and use a microwave like moscafj suggests. Short bursts of heat and stirring often in between should do the trick.
If you want to prevent it from drying out, wrap your sugar in heavy duty foil when not in use to stop air transfer and moisture loss.
Any package date would be a "best by" date, which would indicate quality, rather than safety. Really, the only risk is that the flavor has degraded. If the sugar is hard, you can put it in a microwave-safe bowl with a damp paper towel. Cover the bowl and microwave in short bursts (10 - 15 seconds), breaking up the hard lumps with a fork in between bursts. Be careful not to melt the sugar. Then use as you wish.
High sugar (and salt) concentration causes osmosis from bacteria so they loose their water and die - this is why sugar and salt are great preservatives (eg. jams, salted meat, etc.). And this effect makes sugar (until it doesn't get wet) can not deteriorate. I'm sure you can use that old brown sugar safely.
In my country (and I think in the whole EU) sugars are marked as 'Safe for infinite time'.
Brown sugar bought in US and kept in an airtight package is totally good upto 2 years. I recently used a package which I had bought at Meijer 2 years back. I also saw this website that states that best quality is within 2 years, and if stored properly lasts forever.
My best guess that I am giving based on an experience from a normal sugar is that it should have melted or should feel like a sticky in hand