Well, the truth, as many people have pointed out here, is that there are actually three seperate schools of thought, two of which are scientific and work in conjunction, the other of which is cultural and disagrees with the two scientific schools.
So, if you want to look at it from the culinary school of thought, which is basing its classifications on how the biological matter in question is prepared, then you actually would have been right to consider peppers and cucumbers vegetables.
That said, I have been sticking with the two scientific schools, partially because their divisions are easier to understand, and partially because for the purposes of this topic (which is to find vegetables, which are the healthiest) the nutritional school is important. So, botanically speaking, a fruit is any part of the plant that holds seeds. Fruits are selected by evolution to be high in nutrients that taste good, so that animals will eat them, and pass the seeds which then germinate into a new plant (this is why tomatos, as wel as peppers and cucumbers are fruits). Seeds grains and nuts are a little more obvious, the most common misclassification being that corn is often considered a vegetable, though it is actually a grain. Finally, any part of the plant which is not a fruit or a seed, if edible, is considered a vegetable. This means roots (carrots and potatos for instance), stalks (celery or asparagus) and leaves (lettuce or the heads on broccoli).
The nutritional school, for the most part, works in conjunction with the botanical school regarding how it classifies plants, and it is the most important to consider. Seeds, nuts, and grains, while certainly not bad for you in limited amounts, are higher in calories than any part of the plant, this is because they are filled with nutrients which are meant to fertilize the newly germinating plant. Fruits are also higher in calories relative to vegetables, because the plant has a higher chance of reproducing if animals want to eat them. Vegetables are the best part of the plant you can eat, however, because they have enough nutrients to sustain us, but they also have a lot of fiber, meaning that when eating vegetables we will get full before eating too much.
The only real mystery left is how the hell the mushroom should be classified, considering that it is not a plant at all, but instead it is the final reproductive stages of two mating fungi.