On July 10, 1883, the Supreme Court of the United States ruled that a tomato is not a fruit, in the landmark decision of Nix v. Hedden,.
John Nix and Sons were large produce sellers in New York City. Edward Hedden was the Collector for the Port of New York. The Tariff Act of 1883 excised vegetables, but not fruit. Nix and Sons refused to pay tax on tomatoes since they were fruit.
The Court unanimously voted in favor of Hedden. Although tomatoes are technically fruit as they are the developed ovaries of a plant and contain seeds, they are commonly known as vegetables because they are usually eaten with the main course of the meal and not as dessert, as fruit often is.
FYI, The European Union in 2001 declared carrots were fruit as they are associated with jams, jellies, and marmalades.