Tomatoes with a brighter, deeper color are usually not only better-tasting, but they also contain higher quantities of the most important and peculiar of tomatoes' micronutrients: lycopene.
Try to select tomatoes without cracks, cuts and squished parts, as they can lead to bacterial colonization that degrades their nutritional value, ruins their taste and can be unhealthy. A smooth, shiny peel means the fruit is healthy, but try not to pick tomatoes with a puffy appearance, because this usually means you'll have to remove more refuse and their taste will be inferior. Also, ripe tomatoes usually emanate a sweet fragrance.
Canned tomatoes should be chosen with care, as most countries don't enforce strict rules for lead content. The problem is exacerbated by the acidic nature of tomato juice, that will increase the amount of lead being retained by the food. American tomatoes are strictly checked and can be eaten reliably, but watch out for tomatoes from other countries, especially from Asia, Africa and Eastern Europe.
Tomatoes should be stored away from direct exposure to light, and stored at room temperature (since cold decreases their rate of ripening). The enzyme that ripens tomatoes is inactivated when exposed for several minutes to temperatures lower than 12.5°C (54.5°F). The ripening process can be hasted by placing them in a plastic bag with bananas or apples, since these fruits produce the gas ethylene, which will make the ripening process faster.
Depending on their ripeness when you bought them, tomatoes usually keep for up to a week. If your tomatoes are getting overripe, or you have to store them for more than a week, you can place them in your fridge: this will slow their ripening and allow for an additional 2-3 days of storage.
Please notice that tomatoes are best consumed at room temperature, since they tend to lose their flavor when cold, hence why you can often see "do not refrigerate" labels on them.
Tomatoes can also be freezed, in almost every form you want: you can freeze the juice, the whole fruit or slices.
Sundried tomatoes can be stored for much longer timespans, especially when sealed in an airtight container with olive oil: just be sure to store them in a cool, dry place away from light, to prevent the olive oil from going rancid.
There are several variants of ketchup brands, and some of them feature natural tomatoes: these are the brands you should focus on, if you plan on getting the most lycopene (organic brands contain up to 300% more).
An interesting study at USDA Agricultural Research Service, carried out by Betty Ishida and Mary Chapman, measured the levels of lycopene in 13 different ketchup brands: 6 popular ones, 3 organic and 2 used by fast-food chains.
The study showed that purple and green ketchup variants contained the same levels of lycopene as red ketchup (also very dark red ketchup contained slightly more), but the largest difference was found between non-organic and organic ketchups, with the latter containing as much as three times more (up to 183 micrograms per gram of ketchup, for one organic brand: more than whole tomatoes!) than the non-organic (average levels were 100 micrograms of lycopene for non-organic brands, with fast-food ketchup delivering as little as 60 micrograms).