Why is this power adapter transformerless?
The power supply you've found in this device is of a type known as a capacitive dropper. (More information in the Wikipedia article "Capacitive power supply".)
The primary reason why you don't see this type of power supply often is simple: it is unsafe. This is because one leg of the AC power supply must, by necessity, be connected directly to the circuit. Ideally this should be the neutral leg, but it is difficult to guarantee this -- badly wired outlets, or non-polarized plugs, may result in part of the circuit being energized by the hot leg of the AC supply.
That is a capacitive dropper supply as others have said, but I am going to take a slightly different view of the things safety.....
Iff it is built right into the torch such that no part of the torch or charging circuit is accessible without the use of a tool (So, Battery, LEDS, switch, whatever else) is all sealed inside a plastic box with a suitable mains inlet for charging then it is just fine and perfectly safe. The problem only comes when you try to provide a means to connect such a thing to the outside world, for providing say 10mA or so to trickle charge a battery in an emergency torch this sort of thing is very, very standard.
The green thing is a resistor, mostly there to limit the current drawn of fast spikes when the cap does not a lot of good, most of the voltage is dripped across the capacitor, so little power is dissipated, but the power factor is awful.
There are a couple of places where the creapage distance looks a bit suspect, but apart from that, I have seen much worse.
Most countries require that devices not conduct any significant amount of current between either of the mains supply leads and any exposed metal surface, even when a significant potential difference (e.g. 1000 volts) is applied between the supply leads and that surface.
There are three ways devices can meet this requirement:
Don't have any connection between anything that uses electricity and any exposed metal surface.
For devices that require absolutely tiny amounts of power, connect the mains only through devices that won't pass much current under any condition. Such an approach might be workable for an LCD clock that requires only 10uA, but isn't apt to be practical for much beyond that.
Convert electricity to some other form of energy and then convert that back to electricity. For cases requiring extreme isolation, one could use a mains-powered motor (which converts electricity to a moving magnetic field, which then turns a shaft) connected via non-conductive shaft to a generator (which uses the turning shaft to generate a moving magnetic field, which it would then use to produce electricity). A transformer is a cheaper alternative, which omits the middle two conversion steps, and thus avoids their associated conversion losses.
Approach #1 is the cheapest when it is practical. Approach #2 is very seldom practical. Many devices can't use #1 or #2, and thus implement #3. Transformers aren't the only way to accomplish #3, but they're often cheaper and more practical than any alternative.