2 possible causes. Either something in the code you've uploaded, or something power related.
To determine which i will need more information. Please provide a circuit schematic. How are you powering the ESP ? they are know to be quite power hungry particularly during their WiFi connecting stage, where they have demands up to 300mA
Please post your sketch within </> code tags so we can see if there is anything not quite right in there.
Yes of course it is, again i need to see the code that you are running now.
So does an ESP-01 or an ESP-12. You can see the antenna as a bit of Zig-Zag trace on the PCB. An ESP-07 has a connection for an external antenna, which can be practical if you want to place the antenna a little away from the unit, and with which you can achieve significant more range.