House lawmakers passed an energy bill that would leave it up to the coastal states to choose whether or not to drill offshore for oil and gas.