Many inexpensive flashlights use 3xAAA batteries wired in series (using a small plastic battery holder) to supply power to the LEDs. From my (limited) testing, I have found that these flashlights will work (with some variation in brightness) over a voltage range of 3.2V to 4.5V and there does not seem to be much variation in brightness over the voltage range of 3.6V to 4.5V. Therefore is is feasible to use a single 3.7V lithium battery to replace the 3xAAA battery holder. Lithium batteries come in many sizes and conveniently an 18500 lithium battery has a similar size to the 3xAAA battery holder and can be used as a drop-in replacement. Alternatively a 14500 lithium battery can also be used with an easy-to-make plastic sleeve.
The advantages of using Lithium batteries include: 1) They are rechargeable and better for the environment (Lithium batteries are typically rated for several hundred recharge cycles) 2) they do not leak or corrode over time like alkaline batteries do. 3) A single 18500 cell will last about as long on a single charge as 3xAAA alkaline cell over its entire lifetime (both are typically rated at about 1000 mAh).
Step 1: Using an 18500 Lithium Battery
An 18500 Lithium battery can be used as a drop-in replacement for the 3xAAA battery holder (make sure you get the polarity right).
Step 2: Using a 14500 Lithium Battery
A 14500 Lithium battery can be used as a drop-in replacement for the 3xAAA battery holder if you make a simple plastic sleeve. This sleeve can be made from the plastic tube from of a used glue stick. Simply cut the plastic tube to about 1.9" (~48mm). This dimension is not super critical.
Step 3: Sources for Batteries and Chargers
You will need to purchase a 3.7V Lithium battery charger that can charge 14500 and/or 18500 batteries. I do not have a specific recommendation, but suitable chargers can be found on online shopping sites such as Amazon or eBay.
14500 and 18500 Lithium batteries are available on Amazon or eBay. Make sure that you get the ones that are rated for 3.7V and NOT the older technology cells that are only rated for 3.2V.
Note 1: I have also obtained some usable cells by disassembling used/discarded/recycled Lithium battery packs from digital devices such as digital cameras. Note that Laptop battery packs typically use 18650 cells which will not work (they are too long) for this application.
Note 2: A 3.7V Lithium battery will actually charge to over 4V