The reason we can't just hook a voltage source (like a battery) up to an LED is that a very small change in voltage across leads to a very large change in current. This relationship is also dependent on temperature, so it's very difficult to make a stable circuit.
Putting a resistor in series with the LED makes the current-voltage relationship less like an LED and more like a resistor. We know this relationship well from Ohm's law: \$E = IR\$, voltage is the product of current and resistance. Thus, current still increases with voltage, but there is a much wider range of voltages over which the LED current will be within specifications.
The problem with the resistor is that it wastes energy as heat. Power is the product of voltage and current: \$P=IE\$. So if we have an LED that is running at \$20mA\$ and \$1.5V\$, and we are powering it with a \$12V\$ battery and a resistor, the voltage over the resistor must be \$12V-1.5V=10.5V\$ and the current is the same as in the LED, \$20mA\$. Thus, power wasted in the resistor is \$20mA \cdot 10.5V=210mW\$. The power in the LED is \$20mA \cdot 1.5V=30mW\$. You can see most of our energy is going towards making the resistor warm, and not powering the LED.
Some batteries (coin cells in particular) have a high internal resistance. They have effectively a big resistor in series with them as a consequence of their chemistry and construction. These batteries can not supply much current, because if they do, the voltage will drop over the internal resistance (by Ohm's law). With these batteries, you effectively have the current-limiting resistor intrinsic to the battery, and you can connect the LED directly to it.
But what if you aren't using a coin cell, and you don't want to waste energy in a resistor, or you need better current (brightness) regulation than a simple resistor can provide? What you need is a current source. Most of our energy sources (batteries, wall warts) are voltage sources: they try to provide a constant voltage, and the current will be whatever is necessary to achieve that goal. A current source tries to provide a constant current, and the voltage will be whatever is necessary.
One way to convert a voltage source into a current source efficiently is with a switched-mode DC-DC converter, like this:

There are some details of this circuit that are a bit different because I drew it for a different question, but it still applies. D1 need not be an IR LED; any LED will work. Although the 555 datasheet says it requires a minimum of 4.4V, it does work on 3V. You can use anything up to the 555's maximum of 18V and the circuit will still work. This isn't a sophisticated or ideal solution, but it does demonstrate the idea simply with components you probably have on hand.
A more sophisticated implementation will use a better timer than the 555, like a microcontroller, or one of the many ICs designed for precisely this application. It will probably operate at a higher frequency to allow for a smaller inductor and higher efficiency. It will also have some feedback path to adjust the duty cycle to maintain the desired current. It may do this with a hall-effect sensor, or by replacing Q1 with a MOSFET and measuring the voltage drop over that, or by putting a low-value resistor in the path and measuring that voltage. With such a feedback mechanism in place, your LED will maintain precisely the same brightness over a wide range of input voltages.
Design of these things is a topic in itself, but here's a brief explanation of how it works. The 555 generates a square wave somewhere around 20 kHz. Adjusting R1 will change the duty cycle of this square wave, and thus the brightness of the LED.
When the output of the 555 is low, Q1 is turned on, and L1 sees almost the full battery voltage. This causes a current to flow in L1, slowly at first, then more quickly.
When the 555 goes high, Q1 turns off. Now the top side of L1 is not connected to the battery. The current must continue to flow at the rate it was just flowing (this is what inductors do), so that top leg of L1 will become whatever negative voltage is required to light D1 at whatever the current in L1 was when Q1 switched off.
As Q1 remains off, the energy stored in L1 will be converted into light and heat by D1, and the current in L1 and D1 will decrease.
At some point, Q1 gets turned on again, and this repeats.