What considerations should I take when selecting one and not the other ?
As Tirdad explained, the LDO will waste the difference between input and output voltage as heat. If you want to drop from 12V to 5V, then 7/12=58% of the input power will be burned as heat in the LDO, and the remaining 42% will power the micro.
ESP8266 uses on average about 40mA so that's not going to ruin your electricity bill, and that's only 0.28W average dissipation in the LDO, so it would probably work... except it draws peaks of up to 200mA when using the WiFi, which corresponds to 7V*200mA=1.4W, which is above what an AMS1117 in SOT-223 can dissipate. So if you use the WiFi a lot it could overheat.
Also AMS1117 requires a large output capacitor which is not present on the quoted aliexpress module, so it will probably not work reliably. This is a very cheap and low quality LDO, it is slow, output transient response is poor, and the built-in protections are not as reliable as one would expect. Basically, there are much better LDOs, if you need a LDO, don't buy this one. I've had problems with ESP32 modules getting temperamental, and replacing this part with a better one (LDL1117) fixed the issues.
The buck converter will have much better efficiency, so that's what you need.
Buying cheap DC-DCs off aliexpress is a bit risky. The ones with "LM2596" are all fake with garbage quality capacitors. The one you quote doesn't have electrolytic capacitors, so at least it won't have bad electrolytic capacitors. There is no diode so it's probably synchronous, which means better efficiency. It'll probably work fine.
I'm going to use an ESP32, the project has lots of relays so I went with a 24V power supply, and I'm using this Recom DC-DC which is definitely not expensive. There are also higher current versions, the usual shops (mouser, farnell, digikey...) have plenty of canned buck converters like this, from known manufacturers and with full specs and datasheet...
Note if you want good smooth high frequency PWM for your LEDs, ESP32 is a better option than ESP8266.