The leaf spots for bacterial spot are angular, while those for bacterial speck are round. For a definite diagnosis, place a piece of diseased tissue in a drop of water under a microscope. The speck bacteria ooze out of the tissue in a semi-gelatinous mass, the spot bacteria ooze out freely. Bacterial speck and spot might be confused with other common diseases. The symptoms of other diseases are somewhat different, though.
Early blight causes large target-like spots near the stem of green or ripe fruit.
Septoria leaf spots are circular, brown to greyish, and often have tiny black dots in them. Septoria causes no fruit spots. For both diseases, use disease-free seeds and transplants. Hot water treatment of seeds can be very helpful, as well. Avoid overhead irrigation.