Nightshades (Solanaceae) is a family of plants that include some common vegetables: bell pepper, chili pepper, tomato, potato, eggplant, and even tobacco. While these are staple of modern kitchens, they should be rather consumed in moderation according to Ayurveda.
Nightshades have pungent or sour vipaka. Sour is heating and irritates Pitta. Pungent is heating and drying, it affects both Vata and Pitta.
Banyan Botanicals explains this in their Ayurvedic Food Combining article:
“Nightshades contain alkaloids, primarily as a means of defense against being damaged by insects. The alkaloids can be anywhere from mildly to fatally toxic to humans. As a result, diverse cultures around the world have long held an intriguing relationship with the nightshade family. Some have been used to make poisons, some contain incredibly addictive compounds such as nicotine, some are mind-altering, and others create an incredible sensation of heat in the mouth.
The bottom line is that nightshades contain a complex array of compounds that, once ingested, lead to a potentially dramatic cascade of chemical reactions in the body. Ayurvedically speaking, all nightshades are believed to be somewhat difficult to digest and to have the capacity to disturb the doshas.”
Vasant Lad in his book Ayurvedic Cooking For Self-Healing talks about nightshades too. He recommends that you avoid eating nightshades with the combination of melon, cucumber and dairy products (page 47)—albeit common in many cuisines. He eloborates on tomatoes specifically (page 206):
“[Tomatoes] are generally quite toxic to the system, they are okay once in a while if cooked with spices such as cumin, turmeric, and mustard seeds. Tomatoes are not good for acidity, arthritis, sciatica, kidney and gallstones.”
Eat nigthshades with moderation and avoid particular combinations.