Regulation of energy metabolism can occur at the gene level, where enzymes needed for energy metabolic pathways are either transcribed, or their transcription inhibited. A well-studied example is the Lac Operon which can be seen in E. coli bacteria. The Lac Operon is characterized by an operator which is essentially an on/off switch that controls three coding regions, Lac Z, Lac Y, and Lac A. These regions code for the production of beta-galactosidase, permease, and galactoside transacylase. Permease enables the entry of lactose into the cell. Beta-galactosidase is responsible for the breakdown of lactose to glucose and galactose. Galactoside transacylase is involved in the metabolism of galactose. All enzymes are needed at the same time. It makes sense then that all are transcribed together. In the absence of lactose, a protein repressor blocks the promotor, preventing RNA polymerase from transcribing the DNA to make the enzymes.
When lactose is present, it binds to the protein repressor, releasing it from the operator. This RNA polymerase can now bind to the promotor and begin DNA transcription of the enzymes.