Pronterface not connecting ERROR: A device attached to the system is not functioning
Finally, I found the solution after frying up a Mega board.  The problem is with the Mega board. Part of the board is not functioning properly or not connecting with the RAMPS 1.4 shield properly. So I tried with a new Arduino Mega board and it worked. 
Also removing the D1 diode is the solution for the voltage regulator overheating on Arduino mega board as mentioned in question "Arduino Mega voltage regulator overheats with RAMPS board".