Citric acid does not produce electricity by itself. Rather, this weak acid turns into an electrolyte -- an electrically conductive substance -- when it's dissolved in fluid. The charged ions of the electrolyte allow electricity to travel through the fluid.
Citric Acid Conduction
Acids are electrolytes because they break into negatively charged anions and positively charged cations when they're placed in solution. The electrolytic solution then conducts electricity when the anions migrate toward a positive terminal, made of a positively charged metal, that's placed in the solution and the cations migrate toward a negative terminal, made of a negatively charged metal. When they reach the terminals, the anions take electrons from the positive metal and the cations lose electrons to the negative metal. This electron exchange produces the electrical charge. The terminals must be made of two different types of metal, such as steel and copper, for the reaction to occur.