user32994: I am trying to send AT commands to ESP8266. I re-flashed ESP8266 http://imgur.com/a/J8Ueh I followed this tutorial http://remotexy.com/en/help/esp8266-firmware-update/ and I hope it re-flashed successfully as there was no error. 
When I uploaded this program http://www.pastebin.com/frhZY7tD I am trying to run AT command at 9600 baud rate on serial monitor then no response.. 
Below is how my circuit looks like

#include "SoftwareSerial.h"

SoftwareSerial esp8266(2, 3); // RX, TX

void setup()
{
  Serial.begin(9600); // serial port used for debugging
  esp8266.begin(9600);  // your ESP's baud rate might be different
}

void loop()
{
  if(esp8266.available())  // check if the ESP is sending a message
  {
    while(esp8266.available())
    {
      char c = esp8266.read();  // read the next character.

      Serial.write(c);  // writes data to the serial monitor
    }
  }

  if(Serial.available())
  {
    delay(10);  // wait to let all the input command in the serial buffer
    // read the input command in a string
    String cmd = "";
    while(Serial.available())
    {
      cmd += (char)Serial.read();
    }
    // send to the esp8266
    esp8266.println(cmd); 
  }
}

Trying to execute AT command -

On clicking on send button then it shows empty response like below -

When I unplug power wire and plug it back then it prints some garbled message on serial monitor. I checked voltage on RX also, it was around 3.5V that seems also OK.

I am facing this issue after I flashed WiFi firmware to ESP8266 then back AT firmware. It seems that AT firmware was not flashed successfully so I tried to erase everything using below command.

esptool.py --port /dev/ttyUSB0 erase_flash

C:\Users\williams>esptool.py --port COM4 -b 9600 erase_flash
esptool.py v1.3
Connecting...................

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for pack
et header

Before execute above command, I made changes in my circuit like below :-

Update
I have re-flashed ESP8266 on 115200 baud rate, and uploaded empty program then it started to respond AT commands. I connected as like above only change is TX to TX and RX to RX respectively. Alright!
AT


OK
AT


OK
AT+GMR

AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:46:52
OK

Well, I want to send AT commands from the Arduino serial monitor window to ESP8266 and print ESP8266 response to the command. When I upload above program then it stops to respond, same result as like empty screen this is weird. Isn't ?

user33817: On your last picture, you should connect the Rx of your Arduino to the Tx of your ESP8266 and vice versa.
If you did that and it doesn't work, try to upload an example sketch in order to determine if it's the code or the connexions that are problematic. 
I recommend that you use the WiFiScan example, since that example doesn't require to change the code or to include other libraries othet than the ones from ESP8266Community. 

user313: The ESP's AT firmware is probably configured for a higher baud rate, 115200 is typical. SoftwareSerial only works reliably up to 9600 baud. It can transmit "reliably enough" at 115200 for you to blindly send change-baud commands, though the ESP's response will probably be garbled. So you need to either: Reduce the ESP's baud rate or use the Uno's hardware serial port for the ESP, which means giving up the Uno's terminal output and makes it a pain to reconnect your PC each time you need to update the Uno's code. I've described the process of changing the ESP's baud-rate in more detail in 
this answer.
Update: I'm not familiar with various AT comand-interpreter revs; my ESPs are all running with the firmware rev came on them; "AT+GMR" (show version info) replies:
AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04

There is no AT+CIOBAUD command listed in my ESP8266 AT Instruction Set document rev 1.5.3). The only one listed that affects baud rate - and the one I  use - is:
AT+UART_DEF=<baud>,<databits>,<stopbits>,<parity>,<flowcontrol>

, or:
AT+UART_DEF=9600,8,1,0,0

for 9600 baud, 8 bits, 1 stop-bit, no parity, no flow control. You probably know, but just in case, note that you will lose communication immediately after you change the ESP's baud rate, until you then change the local baud rate to match. 
Update2:

This is program pastebin.com/dquCNYJj I am not sure what wrong I am
  doing

That code sets SoftwareSerial to 115200 baud; it can not run fast enough to receive data at that speed.
Update 3:
Since you've updated the ESP's firmware unsuccessfully, it's hard or impossible to know what's going on. The output in your screenshot looks rather like the result of a baud mismatch between the ESP and your terminal. You need to get a clean firmware update to the ESP before you can expect it to respond correctly and rely on its output to diagnose any other problems.
Update 4:
I'm not sure if we're talking about the same thing so please forgive me if you already know this; we might be talking about (at least) three different baud-rates:

The rate in use during flashing of new firmware to the ESP;
The default rate that new firmware will start listening at, whenever it is booted;
The actual rate used at any given time between the ESP with its new firmware and the Arduino or some other device external to the ESP.

My own experience is with using the factory-installed AT Interpreter firmware. I have never needed to update it so I don't have personal experience with (1).
(2) and (3) are programmable by the Arduino. When I first use a new ESP (or after you've just re-flashed its AT Interpreter), it will listen at a factory-default baud rate (mine have all defaulted to 115200). There are commands to change the current rate (not saved across a reboot) and/or the default baud (saved for all future sessions).
I almost always change its default rate to 9600 to use it with an Arduino software serial port. This is my initialization for a new device, using an Arduino to talk to the ESP. (Don't transmit my '#...' comments):
# Start talking at the ESP's default rate (115200 on my factory-fresh ones).
AT+RST                         # Reset
AT+UART_DEF=9600,8,1,0,0       # Default baud to 9600,N,8,1,no flow ctl
# Here, change the Arduino's port to match: 9600 in this case.
AT+CWMODE=1                    # Station mode (client)
ATE0                           # Command echo off

From now on, the ESP will wake up listening at 9600 baud, in Station Mode as a client, with no command echo. 

32994: <p>I am trying to send <code>AT</code> commands to <code>ESP8266</code>. I re-flashed <code>ESP8266</code> <a href="https://imgur.com/a/J8Ueh" rel="nofollow noreferrer">http://imgur.com/a/J8Ueh</a> I followed this tutorial <a href="http://remotexy.com/en/help/esp8266-firmware-update/" rel="nofollow noreferrer">http://remotexy.com/en/help/esp8266-firmware-update/</a> and I hope it re-flashed successfully as there was no error. </p>

<p>When I uploaded this program <a href="http://www.pastebin.com/frhZY7tD" rel="nofollow noreferrer">http://www.pastebin.com/frhZY7tD</a> I am trying to run AT command at 9600 baud rate on serial monitor then no response.. </p>

<p>Below is how my circuit looks like</p>

<p><a href="https://i.stack.imgur.com/hgqEl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hgqEl.png" alt="enter image description here"></a></p>

<pre><code>#include "SoftwareSerial.h"

SoftwareSerial esp8266(2, 3); // RX, TX

void setup()
{
  Serial.begin(9600); // serial port used for debugging
  esp8266.begin(9600);  // your ESP's baud rate might be different
}

void loop()
{
  if(esp8266.available())  // check if the ESP is sending a message
  {
    while(esp8266.available())
    {
      char c = esp8266.read();  // read the next character.

      Serial.write(c);  // writes data to the serial monitor
    }
  }

  if(Serial.available())
  {
    delay(10);  // wait to let all the input command in the serial buffer
    // read the input command in a string
    String cmd = "";
    while(Serial.available())
    {
      cmd += (char)Serial.read();
    }
    // send to the esp8266
    esp8266.println(cmd); 
  }
}
</code></pre>

<p>Trying to execute <code>AT</code> command -</p>

<p><a href="https://i.stack.imgur.com/NyVIA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NyVIA.png" alt="enter image description here"></a></p>

<p>On clicking on send button then it shows empty response like below -</p>

<p><a href="https://i.stack.imgur.com/c5CX5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c5CX5.png" alt="enter image description here"></a></p>

<p>When I unplug power wire and plug it back then it prints some garbled message on serial monitor. I checked voltage on RX also, it was around 3.5V that seems also OK.</p>

<p><a href="https://i.stack.imgur.com/bsgWD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsgWD.png" alt="enter image description here"></a></p>

<p>I am facing this issue after I flashed WiFi firmware to <code>ESP8266</code> then back AT firmware. It seems that AT firmware was not flashed successfully so I tried to erase everything using below command.</p>

<blockquote>
  <p>esptool.py --port /dev/ttyUSB0 erase_flash</p>
</blockquote>

<pre><code>C:\Users\williams&gt;esptool.py --port COM4 -b 9600 erase_flash
esptool.py v1.3
Connecting...................

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for pack
et header
</code></pre>

<p>Before execute above command, I made changes in my circuit like below :-</p>

<p><a href="https://i.stack.imgur.com/judwG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/judwG.png" alt="enter image description here"></a></p>

<h1>Update</h1>

<p>I have re-flashed ESP8266 on 115200 baud rate, and uploaded empty program then it started to respond <code>AT</code> commands. I connected as like above only change is TX to TX and RX to RX respectively. Alright!</p>

<pre><code>AT


OK
AT


OK
AT+GMR

AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:46:52
OK
</code></pre>

<p>Well, I want to send <code>AT</code> commands from the Arduino serial monitor window to <code>ESP8266</code> and print <code>ESP8266</code> response to the command. When I upload above program then it stops to respond, same result as like empty screen this is weird. Isn't ?</p>
 33817: <p>On your last picture, you should connect the Rx of your Arduino to the Tx of your ESP8266 and vice versa.</p>

<p>If you did that and it doesn't work, try to upload an example sketch in order to determine if it's the code or the connexions that are problematic. 
<strong>I recommend that you use the WiFiScan example</strong>, since that example doesn't require to change the code or to include other libraries othet than the ones from ESP8266Community. </p>
 313: <p>The ESP's AT firmware is probably configured for a higher baud rate, 115200 is typical. SoftwareSerial only works reliably up to 9600 baud. It can transmit "reliably enough" at 115200 for you to blindly send change-baud commands, though the ESP's response will probably be garbled. So you need to either: Reduce the ESP's baud rate or use the Uno's hardware serial port for the ESP, which means giving up the Uno's terminal output and makes it a pain to reconnect your PC each time you need to update the Uno's code. I've described the process of changing the ESP's baud-rate in more detail in 
<a href="https://arduino.stackexchange.com/questions/36447/wifiesp-not-working-on-software-serial-working-fine-on-hardware-serial/36453#36453">this answer</a>.</p>

<p>Update: I'm not familiar with various AT comand-interpreter revs; my ESPs are all running with the firmware rev came on them; "AT+GMR" (show version info) replies:</p>

<pre><code>AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
</code></pre>

<p><br>There is no AT+CIOBAUD command listed in my ESP8266 AT Instruction Set document rev 1.5.3). The only one listed that affects baud rate - and the one I  use - is:</p>

<pre><code>AT+UART_DEF=&lt;baud&gt;,&lt;databits&gt;,&lt;stopbits&gt;,&lt;parity&gt;,&lt;flowcontrol&gt;
</code></pre>

<p>, or:</p>

<pre><code>AT+UART_DEF=9600,8,1,0,0
</code></pre>

<p>for 9600 baud, 8 bits, 1 stop-bit, no parity, no flow control. You probably know, but just in case, note that you will lose communication immediately after you change the ESP's baud rate, until you then change the local baud rate to match. </p>

<p>Update2:</p>

<blockquote>
  <p>This is program pastebin.com/dquCNYJj I am not sure what wrong I am
  doing</p>
</blockquote>

<p>That code sets SoftwareSerial to 115200 baud; it can not run fast enough to receive data at that speed.</p>

<p>Update 3:</p>

<p>Since you've updated the ESP's firmware unsuccessfully, it's hard or impossible to know what's going on. The output in your screenshot looks rather like the result of a baud mismatch between the ESP and your terminal. You need to get a clean firmware update to the ESP before you can expect it to respond correctly and rely on its output to diagnose any other problems.</p>

<p>Update 4:</p>

<p>I'm not sure if we're talking about the same thing so please forgive me if you already know this; we might be talking about (at least) three different baud-rates:</p>

<ol>
<li>The rate in use during flashing of new firmware to the ESP;</li>
<li>The default rate that new firmware will start listening at, whenever it is booted;</li>
<li>The actual rate used at any given time between the ESP with its new firmware and the Arduino or some other device external to the ESP.</li>
</ol>

<p>My own experience is with using the factory-installed AT Interpreter firmware. I have never needed to update it so I don't have personal experience with (1).</p>

<p>(2) and (3) are programmable by the Arduino. When I first use a new ESP (or after you've just re-flashed its AT Interpreter), it will listen at a factory-default baud rate (mine have all defaulted to 115200). There are commands to change the current rate (not saved across a reboot) and/or the default baud (saved for all future sessions).</p>

<p>I almost always change its default rate to 9600 to use it with an Arduino software serial port. This is my initialization for a new device, using an Arduino to talk to the ESP. (Don't transmit my '#...' comments):</p>

<pre><code># Start talking at the ESP's default rate (115200 on my factory-fresh ones).
AT+RST                         # Reset
AT+UART_DEF=9600,8,1,0,0       # Default baud to 9600,N,8,1,no flow ctl
# Here, change the Arduino's port to match: 9600 in this case.
AT+CWMODE=1                    # Station mode (client)
ATE0                           # Command echo off
</code></pre>

<p>From now on, the ESP will wake up listening at 9600 baud, in Station Mode as a client, with no command echo. </p>
