Yellowing of leaves on a tomato plant can be caused by a number of varying factors. Yellow leaves could be the result of under or over watering, lack of sun, nutrient deficiencies in the soil, or it could be caused by a number of different bacterial or fungal infections.
To remedy this problem, the first thing to do is to get a soil test. Most garden centers will test soil. If the soil is low in magnesium or nitrogen, or if it is unusually high in potassium, plants may not be getting the nutrients they need, and should be fertilized. If this does not work, or if the plants show other signs of infection, you may need to use an anti-fungal agent (organic ones are best). Bacterial infections are more difficult to treat, but their spread can be contained by removing infected plants and soils.