Yes, it is true that capsicums belong to the same family as deadly nightshade, Solanaceae. This plant family has many poisonous members and their toxicity depends on the type of alkaloids present in each one. In the case of chile peppers, the primary and most noxious alkaloid is capsaicin which is what makes the peppers hot and is concentrated in the fruit. Unlike tomatoes which also belong to the same family, it is actually the fruit of the chile pepper that is more "toxic" than the leaves and although the toxicity in this case is usually just skin and bowel irritation and some of us love chile peppers because of the capsaicin. Like chile peppers, the fruit of potatoes, berries in their case, are the most poisonous part of a potato plant. This is the case for many other members of the solanaceae family. That's why tomatoes were thought to be poisonous by northern Europeans for a long time. Anyone know how the oogly-inducing Jimson weed got it's name? Now that's a somewhat
culinary-related tale. 
(scroll to the bottom of the link for the story) Anyway, it's easy to confuse one member from another, so that's why people are generally told to avoid members of the Solanaceae family (same goes for mushrooms).
Here's a couple of useful links on poisonous plants:
Canadian Poisonous Plants Information System Colorada State University
Sorry for the lengthy post, but it's not often I get to use my Botany degree and ethnobotany was one of my favourite subjects.