Enhancers are genomic elements that activate time- and tissue-specific gene expression through binding of transcription factors (TFs). Enhancers are therefore critical for successful development and homeostasis. Although the majority of disease-associated genetic variants reside within predicted enhancers, we still have little understanding of how enhancer sequence encodes its function, or the types of changes to enhancer sequence that alter enhancer activity and contribute to phenotypes. We and others have previously shown that suboptimal TF binding site affinity within enhancers are important for maintaining transcription levels and tissue-specificity. Here, we find that single nucleotide variants (SNVs) that increase binding site affinity cause gain-of-function (GOF) gene expression and developmental defects in Ciona robusta and mice. In humans, optimizing SNVs across hundreds of enhancers for a variety of TFs are enriched for GOF gene expression. Thus, a mechanistic understanding of enhancers, namely the importance of suboptimal affinity sites and variants that violate this principle, can pinpoint causal enhancer variants. Beyond the affinity of binding sites, the organization of sites is another component of functional enhancers. The physical properties of TFs and the DNA to which they bind are thought to constrain the way in which binding sites within a functional enhancer can be organized. The interplay of binding site syntax (the order, orientation and spacing of sites) and the affinity of sites is known as enhancer grammar. To better understand how enhancer sequences encode their function, we conducted an exhaustive screen of all possible organization of the Ciona Otx-a enhancer. The Otx-a enhancer activates expression in neural cells and is regulated by a common developmental logic, a tissue determinant (GATA) and signaling pathway effector (ETS). The majority of the organizations are inert, illustrating the importance of syntax within enhancers. We identify syntax features enriched in active enhancers and use them to predict genomic enhancers. We find that considering both syntax and affinity gives the greatest accuracy of genomic enhancer predictions, highlighting the importance of grammar. We also use grammar to design tissue specific enhancers. Collectively, these studies increase our mechanistic understanding of how enhancer sequences encode their functions, and the types of changes to enhancers that can alter their function and may contribute to novel expression patterns and phenotypes.