First consider your sunlight. Tomatoes need about six hours of sunlight a day, while beans and leafy greens tolerate less. Purchase 4 or 5 inch plants for the best chance at success.
Choose the right containers and materials. Be sure your soon-to-be-full-sized plant will fit in the container you choose. Transplanting veggies that get too large can be traumatic and ultimately limit your harvest. Usually an 18 inch pot is big enough for tomatoes, while peppers can handle smaller pots. You will need small rocks in the base of the container to encourage draining, as well as fertilizer, compost and nutrient-rich potting soil. You also may need trellises or poles once growth starts.
Plant your vegetables. Place the small rocks in the container. Then add about half compost and half potting soil. While placing the plant, press firmly around it as you add soil. Stop soil 1 inch short of the container's rim.
Water thoroughly and let drain. If possible, the first time you water, do so in the sink or bathtub to thoroughly wet the soil and allow for good drainage. Water your plants daily as needed.