Unripe (green) tomatoes, leaves and stems contain solanine. Ripe red fruit in small amounts is generally safe.
Solanine accumulates in green parts of nightshade-family plants and is toxic to dogs.
Tomato plants belong to the Solanaceae family and contain the glycoalkaloids solanine and tomatine, concentrated in the green fruit, leaves, vines and stems. These compounds disrupt cell membranes and affect the nervous system. Levels drop sharply as the fruit ripens.
Surse
A bite of ripe red tomato is usually fine. Avoid green tomatoes, vines and leaves entirely, especially in vegetable gardens.