Theory and Analysis of Taxation and Regulation Design in Energy Markets