Thought closely associated with Italian cooking, the tomato actually only reached southern Italy from New World in the 16th century.
It was supposedly bought by two jesuit priest from Mexico and flourished in the region around Naples.
The Italian botanist Piero Andrea Mateoli first mentioned the fruit (the tomato is not a vegetable) in 1544, calling them pomidoro, "golden apples", refering to their yellow color before fully ripened. Mention was made of tomato cultivation in Italy in 1607, but the first known recipe for cooked tomatoes in Italy did not appear until 1705 in a Roman manuscript.
The first tomato sauce recipe appeared in 1797 in coockbook by Francesco Leonardi...
... former cook to Russia's Catherine the Great, but this was more in the style of a French coulis.
The first mention of spaghetti (actually vernicelli) with a sauce of tomato was in 1839, described by Ippolito Cavaicanti, Duke of Buonvicino, in Cucina Casareccia in Didetto Napoletano (Home cocking in Neapolitan Dialect).
By the 19th century tomatoes were widespread throughout Italy, though not yet synonymous with Italian cooking, as it became among the emigrants to America of the end of the century. In 1875, however, Francesco Cirio began to process tomatoes, canning them commercially, and the fruit became widely used and a major industry in Italy.