Cognitive functions require the expression of an appropriate pattern of genes in response to environmental stimuli. Over the last years, many studies have accumulated knowledge towards the understanding of molecular mechanisms that regulate neuronal gene expression. Epigenetic modifications have been shown to play an important role in numerous neuronal functions, from synaptic plasticity to learning and memory. In particular, histone acetylation is a central player in these processes. In this review, we present the molecular mechanisms of histone acetylation and summarize the data underlying the relevance of histone acetylation in cognitive functions in normal and pathological conditions. In the last part, we discuss the different mechanisms underlying the dysregulation of histone acetylation associated with neurological disorders, with a particular focus on environmental causes (stress, drugs, or infectious agents) that are linked to impaired histone acetylation.