Sounds like fusarium wilt, a fungal disease that lives in the soil. It infects only tomatoes and is spread around by infected soil, mulch, tools, and plants.
There's no chemical solution. The best way to prevent it is to remove and destroy infected plants right away (don't compost, get rid of them completely). Don't plant tomatoes in the same place. A three-year rotation plan is best.
The only sure way to avoid it, though, is to plant resistant varieties. Those are ones with an 'F' designation after its name in seed catalogs. (Many plants will have VF or VFN after the name. The F is fusarium wilt.)