One of the best ways to have healthy plants is to grow varieties suited to your particular soil and microclimate. And the best way to do that is to save your own seeds. By saving seeds from the plants that succeed in your plot, you're selecting for the genes best suited to thrive for you, and probably your neighbors too.
Here's how to do it for tomatoes.
Step 1: Know your variety.
Not all tomato varieties are suitable for seed saving. Many commercially available seeds and nursery starts are F1 hybrids, seeds that are a cross of different parents, like a mule is a cross between a donkey and a horse. They exhibit desirable characteristics in the first generation, but do not breed true after that. For example, if you save seeds from a Sungold tomato, a popular F1 hybrid variety, the plants that grow from those seeds will not give you Sungold tomatoes. F1 seeds are not necessarily sterile like a mule, but the plants that grow from them produce unreliable results that are often quite unlike their parents. (Side note: F1 hybrids and GMO's are not at all the same thing! Hybridization is an age-old traditional breeding method, while GMO's are created in a molecular biology lab.)
All open-pollinated and heirloom tomato varieties are suitable for saving. If you know the name of the tomato growing in your yard, it shouldn't be too difficult to figure out whether or not it's a hybrid. The variety in these pictures is Chadwick Cherry, a vigorous plant that has always produced well for me here in the East SF Bay's foggy summers.
Step 2: Choose the healthiest plant
Even within the same variety, there is a fair amount of genetic diversity. If one plant is performing better than the others, it may be because it has a genetic trait that gives it an advantage in your conditions. Choose one or two healthy, ripe tomatoes from your most successful plant, and use those to save seeds.
Step 3: Scoop out the seeds and let them ferment
Set them aside in a dish, somewhere protected, like your kitchen counter. They'll get scummy and moldy, and that's a good thing! Fermenting helps breakdown the gelatinous seed coating, and improves germination.
Step 4: Wash off the scum and let the seeds dry completely
Step 5: Store
Always store seeds in paper so they can breathe, and clearly label the envelope. Stored properly, tomato seeds can last for years, though the sooner you use them, the better your germination rates will be.