The amount of energy consumed by an electronic component is known as power (abbreviated P), measured in watts (abbreviated W). Here is the equation for calculating power:
P = V x I
where V represents voltage and I represents current. When you know the voltage dropped across a component and the current passing through the component, you can use the power equation to calculate the amount of energy consumed by each component.
For a resistor-LED circuit, assume that you know the voltage drops and the current passing through the circuit is 2.14 mA. Using this information, you can calculate the energy supplied or consumed by each component.
The energy consumed by the resistor is
4.7 V x 2.14 mA = 10.1 mW
where mW means milliwatts, or thousandths of a watt.
The energy consumed by the LED is
1.7 V x 2.14 mA = 3.6 mW
The energy supplied by the battery is
6.4 V x 2.14 mA = 13.7 mW
Note that the sum of the power consumed by the resistor and the LED (10.1 mW + 3.6 mW) is equal to the power supplied by the battery (13.7 mW). That's because the battery is providing the electrical energy that the resistor and the LED are using. (Actually, the resistor is converting electrical energy to heat energy, and the LED is converting electrical energy into light energy.)
Say you substitute a 9-volt battery for the 6-volt battery pack. Now you supply more voltage to the circuit, so you can expect to push more current through it and deliver more energy to the resistor and the LED. Because the LED receives more electrical energy to convert into light energy, it will shine more brightly. (There are limits to how much voltage and current you can supply to an LED before it breaks down and no longer works.)