Tomatoes and peppers are an excellent choice for containers. While dwarf or determinate tomatoes can be a better container choice for container gardening due to their shorter size, all tomatoes can grow in containers.
What you will need to grow tomatoes and peppers in a container:
Pot- I wouldn’t use anything less than a 14-inch pot for the peppers (go larger if you can) and an 18-inch pot for the tomatoes (tomato tubs and earth boxes are exceptions).
Soil- Use professional potting mix, add coir and or Soil Moist for helping retain moisture in the soil (especially for the tomatoes), and usually mix in a slow release fertilizer, calcium, and or Espoma’s TomatoTone into the mix.
Fertilizer- You can feed throughout the season with the same or use a water soluble fertilizer.
Support System- Make sure you have a support system for the tomato (I do for peppers as well).
Location- Pick a sunny location, and you’re ready to grow.