Botanically, a tomato is the ovary, together with its seeds, of a flowering plant: therefore it is a fruit or, more precisely, a berry. However, the tomato is not as sweet as those foodstuffs usually called fruits and, from a culinary standpoint, it is typically served as part of a salad or main course of a meal, as are vegetables, rather than at dessert in the case of most fruits. As noted above, the term vegetable has no botanical meaning and is purely a culinary term.
This argument has had legal implications in the United States. In 1887, U.S. tariff laws that imposed a duty on vegetables but not on fruits caused the tomato’s status to become a matter of legal importance. The U.S. Supreme Court settled the controversy on May 10, 1893 by declaring that the tomato is a vegetable, based on the popular definition that classifies vegetables by use, that they are generally served with dinner and not dessert (Nix v. Hedden (149 U.S. 304)).[30] The holding of the case applies only to the interpretation of the Tariff Act of March 3, 1883, and the court did not purport to reclassify the tomato for botanical or other purposes other than for paying a tax under a tariff act.
Tomatoes have been designated the state vegetable of New Jersey. Arkansas took both sides by declaring the “South Arkansas Vine Ripe Pink Tomato” to be both the state fruit and the state vegetable in the same law, citing both its culinary and botanical classifications. In 2006, the Ohio House of Representatives passed a law that would have declared the tomato to be the official state fruit, but the bill died when the Ohio Senate failed to act on it. Tomato juice has been the official beverage of Ohio since 1965. A.W. Livingston, of Reynoldsburg, Ohio, played a large part in popularizing the tomato in the late 1800s.
Due to the scientific definition of a fruit, the tomato remains a fruit when not dealing with US tariffs. Nor is it the only culinary vegetable that is a botanical fruit: eggplants, cucumbers, and squashes of all kinds (such as zucchini and pumpkins) share the same ambiguity.
That’s straight from Wikipedia