As far as I understand, uncoupling of the flow of protons and ATP-synthase provides a bypass for protons between the outer and the inner membrane of mitochondria so that the protons don't have to go through the ATP-synthase on their way to the matrix. I see how it results in loss of electrochemical gradient. But why is heat produced?
ALiceD's comment is perfectly true. (Though in real cases, the short circuiting is seldom absolute as there is usually some finite resistance in the short circuiting wire.)
You can understand this in two ways.
Intuitively, the uncoupling provides a channel for the hydrogen ions to move across the membrane in the direction of their electrochemical gradient without having to do any work. Therefore, the energy it gains by traversing a potential difference, can be thought of as being converted to kinetic energy, i.e. the hydrogen ions are accelerated by the potential difference which causes them to gain speed and hence move at a higher speed than the average in the final compartment. This will cause increased collisions (and more energetic) with the surrounding molecules, slightly increasing their kinetic energy too, which will ultimately increase the average kinetic energy, the measure of which is called temperature. If it was coupled, the hydrogen ions would not have gained the kinetic energy, as the energy they gain by traversing the potential difference would have been used to do work in the ATP synthase machinery.
Rigorously, you can show this using some chemical thermodynamics which includes using $\Delta G$ functions, $\mu$ functions and some related thermodynamic variables. Let me know if you want that explanation.(though I stand the risk of having lost the touch to the mathematical aspect of thermodynamics)
PS:- While the thermodynamic explanation also accounts for the increase in temperature due to obliterated concentration gradient, it is difficult to explain with the former model. You can think of this, as the neutralising of the concentration gradient changes the number of collisions per unit volume (and time), and hence also contributes to the observed temperature change.