Some tomato diseases, such as early blight, overwinter in the soil so it is best to dispose of the plants. See this fact sheet: Tomato Problems. Home composts typically don't heat to high-enough temperatures uniformly throughout the plant material to destroy disease organisms, weed seeds, and the rest, so we recommend against disposing of infested tomato tissue in a compost. Obviously, if you manage your compost pile (turn frequently and maintain moisture levels and carbon/nitrogen ratio), the compost should heat up to 140 degree F and the risk of disease transfer will be significantly reduced.
