Insects encounter a vast repertoire of chemicals in their natural environment, which can signal positive stimuli like the presence of a food source, a potential mate, or a suitable oviposition site as well as negative stimuli such as competitors, predators, or toxic substances reflecting danger. The presence of specialized chemoreceptors like taste and olfactory receptors allows animals to detect chemicals at short and long distances and accordingly, trigger proper behaviors toward these stimuli. Since the first description of olfactory and taste receptors in Drosophila melanogaster 15 years ago, our knowledge on the identity, properties, and function of specific chemoreceptors has increased exponentially. In the last years, multidisciplinary approaches combining genetic tools with electrophysiological techniques, behavioral recording, evolutionary analysis, and chemical ecology studies are shedding light on our understanding on the ecological relevance of specific chemoreceptors for the survival of Drosophila in their natural environment. In this review we discuss the current knowledge on chemoreceptors of both the olfactory and taste systems of the fruitfly. We focus on the relevance of particular receptors for the detection of ecologically relevant cues such as pheromones, food sources, and toxic compounds, and we comment on the behavioral changes that the detection of these chemicals induce in the fly. In particular, we give an updated outlook of the chemical communication displayed during one of the most important behaviors for fly survival, the courtship behavior. Finally, the ecological relevance of specific chemicals can vary depending on the niche occupied by the individual. In that regard, in this review we also highlight the contrast between adult and larval systems and we propose that these differences could reflect distinctive requirements depending on the change of ecological niche occupied by Drosophila along its life cycle.