There are four basic types of soil the average gardener will come across, be it in his own backyard or out in commercial fields: clay, sand, loam and peat. Having the wrong one doesn't mean you can't plant vegetables, because there are no wrong soil types. However, one vegetable is not likely to grow in all types of soil equally well. So, it isn't so much a question of establishing what soils vegetables grow well in as examining the traits of each soil and determining which vegetables you can cultivate in each type.
Sandy soils are made up mostly of granulated particles of silica and quartz. The weight, heft or density of sandy soils is affected by the presence and quantity of humus. Humus is partially decomposed organic matter and greatly adds to the nutrient content of sandy soils. As a rule of thumb, the darker the soil, the more humus present. Grow vegetables with thin, delicate root structures that cannot break through hard earth in sandy soil. Examples include carrots, parsnips, garlic, beets, radishes and early-blooming lettuces.
Clay soils are not made purely of clay, otherwise the soil would be a solid block. But clay, even in small percentages, has a significant effect on the soil. When dry, it's hard, crumbly and extremely difficult to dig or aerate. When wet, it becomes slick and slightly syrupy. Clay holds nutrients well, but drainage is its weak point. It retains moisture rather than letting it drain out. To that end, only plant vegetables that can withstand overly moist environments in clay soil; potatoes, broadbeans, brassicas, kale, cabbage and peas are appropriate for clay soil.
Loam is best described as the ideal medium between sand and clay. It contains both in near equal measure, providing the benefits of both and the hindrances of neither. Sand helps lighten the soil, allowing for light root systems to grow unhindered, while clay retains moisture and nutrients for the vegetable. Loam tends to be a little high in alkalinity. For that reason, lime is often suggested as a soil additive. Even without lime, you can expect a reasonable crop yield of healthful vegetables like artichokes, eggplants, cauliflower, corn, cress, yams, squash, spinach, okra and onions.
Peat soils have nothing to do with peat moss, and instead are composed of decaying organic matter. In the marshier parts of the world, pure, dense peat is harvested and used as fuel. Because of the amount of decayed matter, peat soils are high in nutrients and minerals, but are very acidic. Also, the spongy nature of peat means the soil is prone to retaining too much water. For those reasons, vegetables high in natural acidity that require lots of water are best cultivated in peat soils; examples include celery, tomatoes, asparagus, cucumbers, pimento, rutabagas and turnips.