Planting tomatoes is fairly easy. You have to pick the right time in spring when there is not too much rain to drown the tomatoes. In the beginning of the summer is when you can plant the tomatoes too.
The sun can be shining or not shining that much. Tomatoes grow better in the heat. Never plant tomatoes in the winter. You will plant them and they will freeze. Even if you are in a warm climate like the south do not plant them during the winter. It might get cold one day and then warm the next day.
The drops of temperture or vice versa will cause the plant to get sick and eventuallly die. The pot for the tomatoes has to be big if you do not have a yard and still want to grow it. The tomato plant needs sunlight and warm air and water to survive. You could even grow it in your house even though it will be hard. The same rules apply no matter where you are growing it. Have fun growing your tomato plant.