The Wemos D1 Mini DHT shield V1 is a simple board that hooks up a DHT11 temperature and humidity sensor to the ESP8266. The data line from the sensor is connected to pin D4, which the ESP8266 uses during boot as a second TXD line. (This is why the LED flashes as you upload a new sketch: the LED is connected to D4.)
At least for the boards I’m using, this confuses the sensor completely, and it will not react to the ESP8266 trying to read data from it.
The only way to fix this then is to move the DHT22 data line to another pin. First, I cut the trace on the bottom of the PCB:
This is how it looks like after the cut:
Finally, I connected the data line from the DHT22 to pin D0:
With the Arduino sketch adjusted to use pin D0 instead of D4, the sensor can now be read reliably.
p.s. It is possible that this problem is limited to clone boards that use the DHT22 instead of the DHT11. I now see that Wemos has discontinued the V1 version of this board. The current version uses a DHT12 sensor that communicates via I2C.