In a cooking sense, tomatoes are a vegetable. Botanically, they are a fruit because of the part of the plant that they are.
Believe it or not, there was an actual ruling on this issue in 1883 by the Supreme Court. Part of that ruling clarifies this matter:
“Botanically speaking, tomatoes are the fruit of a vine, just as are cucumbers, squashes, beans, and peas. But in the common language of the people, whether sellers or consumers of provisions, all these are vegetables which are grown in kitchen gardens, and which, whether eaten cooked or raw, are, like potatoes, carrots, parsnips, turnips, beets, cauliflower, cabbage, celery, and lettuce, usually served at dinner in, with, or after the soup, fish, or meats which constitute the principal part of the repast, and not, like fruits generally, as dessert.”