The best way to think of the energy (element, dosha) of a food item is it's taste. Taste is very important in Ayurveda as it imparts another more subtle layer to what we ingest. More subtle than the strong pharmaceuticals we consume to treat ailments and even more subtle than the nutrition that comes from food and supplements - at the very apex sits the energy or taste of the food to complete our wellness at an individual level.
Ayurveda has Six Tastes: Sweet, Sour, Salty, Pungent, Bitter and Astringent.
Each taste has a distinct effect on the body. For example , sweet taste is nurturing and often desired at times of emotional fragility. Too much sweet can increase weight - but this is not simply due to the high calorie content of sugary foods. Even when low-cal or sugar-free substitutes are consumed, weight tends to stay on. This is because the taste for sweet has remained - and in order to reduce weight, this taste needs to be modified. Pungent taste can inflame anger, sexual desire and many religious groups who practice celibacy will avoid garlic, chilli and other pungent foods - preferring instead the bitter taste that promotes introspection. Those prone to melancholy (depression) should avoid too much bitter in their diet. And astringent tastes such as unripe bananas will aggravate vata symptoms like insomnia and anxiety.
Examples of all these tastes are in your kitchen already!