"Violence is the last refuge of the incompetent". This is a quote by Salvor Hardin, a character in Isaac Asimov's Foundation. Salvor Hardin uses this saying to mean that violence is such a useless option that only the incompetent would use it, and even they would only use it as their last resort. He feels that the incompetent are eventually forced to resort to violence because a better solution remains outside of their grasp.
Above writeups put forward the ideas that "This is only true because the competent would have resorted to violence long before the last refuge" and "One of the silliest sayings is Violence never solves anything". It appears to me that these write ups may have missed the point of the saying and were probably put forward flippantly or in jest. A further clarification of this point of view may be useful.
Violence may appear to solve something in the short term, but it does not appear to work as a long term solution. I am assuming here that we prefer not to be at war, in pain, sending our sons to their death, having our families blown up and our most symbolically important buildings destroyed etc.
In the context of the Foundation series, it is certainly long term goals that are being sought after. These books follow a society over hundreds of years (see node and book). Salvor Hardin is the mayor of the Foundation for a time and it is his responsibility to ensure the safety of the Foundation both in the face of extreme adversary (the Foundation is one planet - it has to survive all that the rest of the galaxy can throw at it) and with a goal to survive in the long term.
An earlier writeup gives the example that "The most efficient way to stop someone from pissing you off is probably to put a few ounces of lead in their brain stem". Naturally, this is a good short term solution, however, the long term consequences are that you will probably go to jail (gaol) or if you are in the USA (for example) you could be put to death. As well as the obvious physical consequences of this act, what if you regret your actions? At this point you cannot bring the person back to life; would you be able to live with yourself? For a good description of mental turmoil brought about by taking a life read Crime and Punishment by Fyodor Dostoyevsky.
For another example, we could expand the above to the scale of countries pitted against each other. Imagine we are the head of state for a country and there is another country that is bothering us, for one reason or another. If we attack this country, they will resist - this will lead to deaths on both sides. Perhaps we will eventually "win" and impose our will, but will the ends justify the means? How happy will we be to have caused such destruction? How will that country react to us in the long term, will its people rebel or put forward terrorists/freedom fighters against us? Have we sacrificed our beliefs or elements of our way of life to accommodate this solution? Perhaps we could have cogitated longer and arrived at a non-violent solution - a solution with less pain and a longer future.
To summarize: A non-violent solution lasts much longer (hands up who thinks another Palestinian bomb/Israeli attack will solve that conflict) and causes less pain (are there any among us who would like to cause suffering or be made to suffer?), however, we might have to think for a bit longer to come up with one.