Each strain of marijuana gets its distinct flavor from its terpene flavor profile. Terpenes are a group of volatile unsaturated hydrocarbons found in the essential oils of plants, especially conifers and citrus trees. Over 200 terpenoid compounds have been identified in cannabis. This is what causes the aroma, flavor and therapeutic effects you get after smoking. Eight of these compounds are most frequently found in common strains (taken from of Green: A Field Guide to Marijuana):
Certain terpenoids are easier to identify than others, especially when a marijuana strain contains several different terpenoids. The strain hunters from Green House Seed Company in the Netherlands have many years of experience identifying quality strains and they've created a chart to identify the flavors within them. Below is a chart that they developed specifically for cannabis: