Due to the constant revision of part numbers and datasheet for the ST LD1117 over several years, it's hard to 100% prove that you have the Adjustable Version. The current Datasheet shows the topcode LD1117AV as the TO-220 package, but has only shows the 3.3V fixed regulator available in that package.
But some googling found an example of the 3.3V fixed regulator.
![enter image description here](https://i.stack.imgur.com/PYK5l.png)
Notice the obvious LD1117AV33 on the IC, meaning this is the LD1117 To-220 Fixed 3.3V regulator option, likely made in Week 49 of 2013.
As such, you have the adjustable version, and by tying the "GND" pin, really the "ADJ" to ground, it defaults to the 1.25V internal reference voltage, and regulates to 1.25V ± 0.07V, under load (suggested as 10mA minimum. A 1KΩ Resistor is not enough for 10mA, so you might see some ripple or out of regulation voltage.)
To make it 3.3V, you need two resistors. A 1K from VOUT to ADJ, and a 1.64K from ADJ to Ground would give 3.3V out. Use a LD1117 calculator if you want to use different value resistors.
9V batteries are great for smoke alarms, but pretty shocking for anything else. The capacity of a standard PP3 (alkaline) is about 400mAh and has an internal resistance of around 5 Ohms (in fact some low duty ones internal resistances closer to 20+ Ohms). So basically not a lot of energy, poor current capability, and lots of energy wasted internally. If you use a linear regulator as you are, you are wasting 63% of that energy as heat in the regulator. You'd end up with a run time of only about 2 hours before your battery dies. The regulator will be dissipating over 1 Watt which is quite a lot without a heat sink.
Using a switching regulator would help - you reduce the current draw from the battery which reduces the losses on the internal resistance, whilst also massively reducing the losses in the regulator, so you claw back some of that wasted energy for a longer running time. But it still isn't a lot - at 200mA draw on the output, and assuming you have a 90+% efficient switching regulator, theoretically that would give you around 5 hours running time (factoring in the internal resistance). And that is not accounting for the discharge curve - the voltage will drop off much sooner than 5 hours, and as it does the switching regulator will start drawing more and more current from the battery to try and maintain the output voltage meaning more losses internally in the battery.
A standard alkaline AA battery by comparison has a capacity of around 2500mAh or more and an internal resistance of <0.5 Ohm. The trouble is the voltage - 1.5V. There are however many simple switcher ICs and modules out there that can run off a single AA or AAA cell and step up to a 3.3V output. This combination would give you around 4.7 hours with one cell and a boost converter. The main reason for the lower run time is there will be a much higher current draw from the battery than at the output as is the way with boost converters, so there will be more lost in the internal resistance. But even still you get a similar run time as a PP3 in less space, and with batteries that tend to be far cheaper. Or you could use the same approach but go for a D cell battery for example, those have a lower resistance and much higher capacity (closer to 15Ah), so with one of those and a boost converter you would have a run time of around 30 hours - 6 times longer than a PP3.
If you were to use more than once cell, i.e. go for say 3 AA batteries in series, your voltage will go up (capacity stays the same) and so will the run time. With 3 in series and a step down converter, you would have a run time of closer to 16 hours (at 200mA). You could even simply use a low drop out linear regulator to bring that down to 3.3V - it would hurt efficiency, but you would still be able to get a running time of around 12 hours - so still much more than the PP3.
Best Answer
You should look for a low drop out linear regulator which will regulate the battery voltage to 3.3V
For example a TC1262 from Microchip has a drop out voltage of about 300mV at a normal current consumption of the ESP8266.
If you prefer a ready-made module instead take a look at AMS1117 3.3V modules on Ebay.