Last week we learned that vertebrates react to smells and tastes using G-protein-coupled receptors (GPCRs), a family of proteins that "sense" molecules outside the cell surface and, depending on the molecule, activate a series of cascade events inside the cell which triggers the appropriate cellular response. This is how we distinguish good flavors from bad flavors and similarly with smells.
We also learned that tastes are not always shared across species. In fact, the genes that encode GPCRs have been turned on and off throughout evolution multiple times, allowing for example some species to be sensitive to certain tastes or smells or colors, while others aren't. How do we know?
The molecular evolution of sensory systems can be retraced by looking at two things in particular: (1) the multigene families that encode the smell, taste, and pheromone receptors; (2) pseudogenes, the remnants of once functional genes that have been silenced and/or replaced by new genes. I've talked about pseudogenes in older posts (look here and here). The DNA is often redundant and gene duplication events occur relatively frequently throughout evolution. Sometimes a copy carries a mutation that, if advantageous, may be picked up by a selective sweep. When that happens, the older, now redundant copy gets silenced and becomes a pseudogene -- a no longer coding portion of DNA. Through phylogenetic analyses, researchers can determine when these genes lost their functionality and understand how senses have evolved across species.
In  Emily Liman gives a beautiful example with vision: the photoreceptors in our eyes contain photopigments consisting of a GPC receptor called opsin. Humans, apes, and some primates have three distinct types of opsin, each able to maximally absorb either blue, red, or green light. This makes our vision trichromatic. Other animals like rodents, instead, are dichromatic: they only have two kinds of opsins, which maximally absorb either blue or red/green. Now, it turns out, the green opsin gene is nearly identical to the red opsin gene, making it likely that one derived from the other through a duplication event. On the other hand, humans have completely lost the capacity to detect pheromones, which is the function of the vomeronasal organ. The GPCRs in the vomeronasal organ are encoded by two gene families called V1R and V2R. Mice have 165 functional genes in the V1R family and 61 in the V24, whereas humans have 4 possibly functional genes in the former and none in the latter. However, we have roughly 200 pseudogenes in the V1R family, indicating that at some point in our evolutionary history these genes underwent a loss of function. Computational methods show that the loss of vomeronasal functionality in human evolution happened 25-40 million years ago, which happens to be the same timeline as to when trichromacy appeared.
"Interestingly, this is the same time when trichromacy appeared, suggesting that visual signaling may have replaced pheromone signaling. Indeed, catarrhine primates show prominent female sexual swelling and other sexual dimorphisms, which provide a visual signal of reproductive and social status. Thus, it is likely that as primates began to rely on these signals over chemical signals, the vomeronasal organ became redundant, and selective pressure was relaxed on molecules it uniquely expresses."Similar observations can be made about the olfactory receptor genes: humans have 802 genes, of which ~50% are pseudogenes, versus the 25% of the 1,391 genes in the mouse, indicating that at some point in our evolutionary history selection on these genes was relaxed.
There have been evolutionary changes in taste sensation as well, and typically these changes reflect adaptive changes in diet.
"Taste allows animals to determine the nutritive content of food before ingestion: of the five identified taste modalities, three (sweet, umami, and salty) signal the presence of essential nutrients and lead to ingestive behavior. The other two modalities, bitter and sour, signal the presence of toxins or the spoilage of food, respectively, and, to most animals, are aversive."Genes encoding the sweet receptors are well conserved across all land vertebrates with the exception of cats, whose sweet receptor T1R2 is a pseudogene (and therefore non-functional). three of the bitter receptors have become pseudogenes in humans and, furthermore, a polymorphism has been reported in the population which affects the way some of us perceive a molecule called phenythiocarbimide. This variation was also found in chimpanzee, which makes the polymorphism predate the divergence of the two species.
"Expansion of the number of genes encoding sensory GPCRs has, in some cases, expanded the repertoire of signals that animals detect, allowing them to occupy new niches, while, in other cases, evolution has favored a reduction in the repertoire of receptors and their cognate signal transduction components when these signals no longer provide a selective advantage."
 Liman, Emily R (2006). Use it or lose it: molecular evolution of sensory signaling in primates Pflugers Arch. , 2 (453), 125-31 DOI: 10.1007/s00424-006-0120-3