The best fruits and vegetables for growing in hanging baskets are those that trail. A trailing plant benefits greatly from having space off the ground to hang and produce. The baskets you use must be deep enough for the roots of the plants you place in them, must have good drainage and must be hung with enough space between the hanger support and the plant that the plant receives adequate sunlight.
Tomatoes benefit from being allowed to hang, and often show much better yield due to the fact that they are not allowed to lay on the ground, resulting in rot. The rule of thumb is to have a 5-gallon basket for each plant. With large plants, use a basket with a coconut shell and make an opening in the bottom of the shell for the young plant. Small varieties of cherry and grape tomatoes do well planted normally in the top of the basket and allowed to trail over the sides.
Strawberries, raspberries and gooseberries are the best berries for hanging baskets, with strawberries being the popular option. They do well in smaller containers, but do need a lot of feeding and watering to keep up production.
Root vegetables are those that the root is the part that is eaten, and consist of carrots, radishes, turnips and onions. They do well in baskets provided the baskets are deep enough. For instance, carrots need an additional 2 to 3 inches of depth after their mature length. A 7-inch carrot needs up to 10 inches of soil.
Herbs are a popular choice with container gardeners, and do well in baskets as it keeps them out of the reach of wildlife and pets. Just about any herb can be grown, and a large basket (more than 12 inches) can take up to three plants. Herbs prefer about 6 hours of direct sunlight each day, but watch for scorching or wilting and limit time if that occurs.