Electrostatic energies provide what is perhaps the most effective tool for structure-function correlation of biological molecules. This review considers the current state of simulations of electrostatic energies in macromolecules as well as the early developments of this field. We focus on the relationship between microscopic and macroscopic models, considering the convergence problems of the microscopic models and the fact that the dielectric 'constants' in semimacroscopic models depend on the definition and the specific treatment. The advances and the challenges in the field are illustrated considering a wide range of functional properties including pK(a)'s, redox potentials, ion and proton channels, enzyme catalysis, ligand binding and protein stability. We conclude by pointing out that, despite the current problems and the significant misunderstandings in the field, there is an overall progress that should lead eventually to quantitative descriptions of electrostatic effects in proteins and thus to quantitative descriptions of the function of proteins.