Understanding Dividing Voltage
The TMP36 has a voltage output of 0V at -50°C and 1.75V at 125°C, so you should be able to connect it directly. 

I believe that the ESP8266 runs from 3.3V, so you should have no worries if the TMP36 is also powered from that supply (if the ESP8266 supply was lower there might be a concern). 

Edit: The ESP8266 SOC apparently has an internal ADC with a range of 0-1.00V. You can thus only use the ADC with direct connection if you do not wish to measure temperatures greater than 50°C. If you want to go to higher temperatures you can divide the voltage (for example, by two) and multiply after conversion, however your resolution will be reduced to half (about 2mV rather than 1mV, which translates to 0.2 degrees C rather than 0.1 degree C). 

This also explains the problem you had with the code. The multiplier is not really the power supply, it's the ADC reference voltage (which happens to equal the power supply in the Arduino). In the case of the ESP8266, the reference is 1.0V.