Understanding when certain components need a lower voltage
For diodes:

If you apply too high of a voltage to a diode, it will conduct lots of current and burn itself out very quickly.  If you apply too low a voltage to a diode, it won't turn on.  The solution is to apply exactly 2 volts to the diode.  With one diode and a 9 volt battery, the simple solution is to put a resistor in series with the diode to burn off 7 volts of the energy so the diode only sees 2 volts.  Note that this creates a DC current through the diode and resistor.

Remember, diodes have a constant voltage drop, not a constant current.  The diode will pull whatever current is necessary to have only 2 volts drop across its PN junction.  If a current limiting resistor isn't used, then the diode will be using the resistance of the copper as the current limiting resistor and will pull enough current to cause a 7 volt drop across the resistance in the copper.  This is assuming ideal diodes that never burn out.  A real diode would burn up quickly.

For integrated circuits (ICs):

The problem with "electronic modules" (or ICs) is that the amount of current needed varies with time.  For example, a microcontroller has many, many diodes in it.  Sometimes, parts of the IC (like the ADC) are turned off and those diodes are not conducting very much current.  Later, that part of the chip might be turned on and now all the extra diodes (for the ADC) require additional current to function.  What this means, is the current flowing into an IC is often AC current.  

The problem is that AC current through a current limiting resistor creates AC voltage.  If the AC voltage drops below the threshold voltage of the diodes, then the chip stops working because all the diodes are off.  If the voltage rises too high, then the chip will conduct lots of current and burn itself out just like a diode without a current limiting resistor.  What the IC needs is DC voltage that isn't too low or too high.  The simple solution is to apply exactly 2 volts.  The problem is you only have a 9 volt battery.  There are a few solutions.  Voltage regulators basically create AC resistance that compensates for the AC current to create a DC voltage output.  So, it provides a current limiting resistor to burn off the extra 7 volts, but it changes it resistance to allow the correct current into the IC.  Buck regulators step the voltage down by quickly connecting and disconnecting the power and using a capacitor to smooth the voltage to a near constant 2 volts.  So the buck regulator would be connected approximately 2/9 of the time, and disconnected approximately 7/9 of the time.

I oversimplified some things, but that's the gist of it.