Tomatoes need full sun, at least 6 hours of direct sun a day, and do best with 8 to 10 hours. Give them moist, well-drained, loamy soil that is slightly acidic. Have your soil tested and adjust it as the results recommend.
Choose a spot where tomatoes, potatoes, peppers or eggplants have not grown for the past 3 to 4 years. This helps avoid diseases that build up in the soil.
Tomatoes are very tender to frost, so set plants out only after all danger of frost has passed and the soil has warmed. Space them 18 to 36 inches apart, depending on their growth habit and whether you stake or cage them. Water plants well before transplanting, and plant in the late afternoon or on a cool, cloudy day.
Plant tomatoes deep. Remove the lowest leaves and bury the stem so only the top two or three sets of leaves show, since roots form along the buried stem. Lay a tall, leggy plant on its side in a shallow trench instead. In a container, use a pot of at least 5 gallons, with one plant per pot.