I work at a community organization that receives a lot of donations, including tires, in various condition. We inspect tires for obvious damage and wear, and signs of aging like hardening or cracking. Are there non-obvious reasons to be wary of donated rubber that looks fine, just a little old?
This is a great question and there are actually some good ways of approaching it.
Inconveniently, you need to see the tire installed and inflated to have high certainty that it's good for reuse. Until then, there could be casing issues (bulging, cracking that's worse than it looks deflated, distortion, etc) that aren't apparent when it's just a loose tire.
However, there are heuristics you can exploit that allow you to do some pretty good screening even on loose tires.
For commercial shops that save unwanted used parts and donate them to community shops or bike projects, a very common scenario is a customer that has a pair of old tires on their bike and wants to start fresh with two new ones. It is overwhelmingly common in this case that the rear is toast and the front still has life left. On the bike, the most direct symptoms to observe are the roundness profile at the contact patch. Worn out tires get pretty squared off, and if the front one was the same age you often have a good visual comparison between still-pretty-close-to-original in profile versus worn. (There is a tangential conversation here about the merits of rotating tires on bikes, but that is a religious question and most people don't do it so we'll leave it at that).
If you're presented with two of the same tire and one is way less worn down the middle, it's pretty likely it was a matched pair, the rear eventually started flatting or having other issues or was just worn out, and the front is still usable. For that situation, throw away the more worn one and give the other a shot.
Where it could be murkier is when whoever donates you the tires has done you the favor of already throwing away the rear and only giving you the front. There are pretty good odds that if it's a tire that seems weathered but not all that worn on the contact patch and with no other apparent issues, that is what's going on.
Another approach is observing the thickness of the middle of the tire compared to the adjacent areas, where it's reasonably assumable that the starting thickness was the same as the middle. If the contact patch is a lot thinner than the tread areas that started at the same thickness, the tire is probably toast.
Worn tread is easy to spot.
Here are some pictures - things to look for in tires to evaluate if they need replacement:
Time and sun are not kind to tires. This is an example of dry rot caused by oxidation and UV on both gum wall and black wall tires.
Dry rot makes a tire "crunchy" it loses it's flexibility and becomes brittle so that the casing, sidewall or tread can break allowing the tube to come through or the bead to separate.
You can feel dry rot with your hands by flexing the tire. A tire should be flexible. Sometimes you can actually hear the tire make crunching sounds as flexing breaks casing threads and makes tread crackle.
This is tough to answer as it'll be different for different types of tires.
For my riding styles, a tire is shot when the side walls won't stop weeping (all bikes), when the knobs stop hooking up (MTB), or when punctures/gushers/flats are becoming increasingly common (road, commuting).
Weeping sidewalls might be apparent in a donated tire, but probably not. Roached knobs aren't an issue if the tire is going on a beater/around-town bike that simply needs to roll for someone on a tight budget.
But the increasingly common flats/punctures angle is really what counts. For that, I would try to qualitatively gauge the thickness of the non-knobby tread and make a judgement call based on my gut feeling. For the types of bikes I've helped build at a community center, I'd be pretty quick to throw out worn, non-rugged tires.
Short answer - if you wouldn't feel safe riding on the tyre yourself on a high-speed descent, then it is for the bin.
Add a mental safety-factor/margin of error of 20% and don't be hesitant to say "no thanks" to donations that don't meet the grade. You don't want to become the dumping ground for literal rubbish at your group's expense.
Err on the side of caution - there's always more tyres in the donation stream.