Summarize:

At the end of the day, there are very few circumstances where the minuscule amount of calories in berries are worth the risk of getting sick. Even in a survival scenario, it is not worth the risk. Diarrhea, vomiting, and nausea all strip you of vital fluids and sugars, putting you in far more danger than you would have been without the small bit of food.  Just because you see an animal eat a berry does not mean they are safe for humans, this is especially tempting if the animal is a mammal. The following advice is meant to give you guidelines, not hard rules. Never eat a berry you can't identify. In most cases (some botanists guess as high as 90%), these three colors indicate poisonous berries. While a knowledgeable camper might be able to name or find some exceptions, the best rule is to avoid all white, yellow, and green unless you're sure it is safe.  Red berries are roughly 50% safe to eat, so some basic testing may show you what is safe and what isn't. If they are in clusters -- usually bad. Solo berries -- usually okay.  In general, blue, black, and aggregated berries (ie. raspberries, blackberries, etc.) are safe to eat. There are, however, some exceptions (Pokeberry, with its bright pink stalk and dark berries, is very toxic). In general, the following plants are not safe for humans to eat, including the berries. You should check for:  Milky or odd-colored saps. Berries or nuts in pods and bulbs Bitter or soapy taste Spines or small pointy hairs Pink, purple, or black spurs. Three-leaved growth pattern (like poison ivy) A good way to check berries in a pinch is to see if the juices cause any irritation. First, crush the berry on your arm, waiting five minutes or so to see if you get irritated. Then repeat the process on your lips and gums. Finally, chew a berry for 10-15 minutes, but don't swallow it. If none of this causes irritation, move on to the next step. Only test one berry at a time. These tests are useless if you can't tell which of the two berries is causing the problem. If you're in serious doubt, it is best to move on. But if you need the berries for survival, you should eat slowly, seeing how your body reacts. Within 20 minutes you should see symptoms if you're going to get sick.  Even if you're fine after 20 minutes, keep eating slowly. Pace the berries out over a long time to prevent any toxins from gathering and give you time to adjust or note problems. If the berry tastes terrible, then this is a good indicator that it may be poisonous. There are not a lot of hard and fast rules about berries because there is such a large variety. If you are going on a hike or an expedition, carry a book with the names, pictures, and descriptions of berries. This way you’ll know which berry you are looking at. You will likely experience intense digestive disturbance and nervous symptoms. In general, if the following symptoms appear within a few hours of eating the berries, see a doctor immediately:  Nausea Vomiting Dizziness Diarrhea Convulsions Blurred vision Cramps Otherwise fine berries can turn toxic in an instant if covered in chemicals. Smell the berries beforehand, and steer clear of areas near farms, homesteads, or large gardens to be safe.  If you know a berry is safe, but are worried about pesticides, you can still rinse the berries off in clean water and eat them safely.  Chemical poisoning will often bring the same symptoms as poisonous berries.
When in any doubt, do not eat wild berries! Stay away from white, yellow, and green berries. Stay away from berries on plants with spines, bitter smells, or milky sap. Smash the berries to test the juice on your forearm, lips, and tongue. Eat 1-2 berries and wait 20 minutes if you absolutely must get something to eat. Always look up or carry plant identification information when going to new environments. Know the symptoms of berry poisoning. Avoid any areas sprayed with herbicide, pesticides, or other chemicals.