Tomatoes are both fruits and vegetables, depending on the context in which they are being discussed. Botanically, a fruit is a ripened flower ovary that contains seeds, and by this definition, tomatoes are fruits. However, in culinary terms, vegetables are plant parts that are not so high in fructose and are usually served as part of the main dish or side, while sweet fruits are typically snacks or desserts. Tomatoes are usually prepared in savory dishes, which is why they are considered vegetables in culinary terms.
In summary, tomatoes are fruits from a botanical perspective, but they are considered vegetables in culinary terms.