A friend who has read more than I have sets the record straight:
I do not know whether Burke ever said: "The only thing necessary for evil to flourish is for good men to do nothing."
But I do know that in 1867, in fulfillment of his obligation upon being elected by the students to the position of Honorary Lord Rector of the University of St. Andrews, J. S. Mill gave to the university community a remarkable speech on liberal education. In explaining why liberal education must include study of the law of nations, Mill wrote,
"Bad men need nothing more to compass their ends, than that good men should look on and do nothing."
The Inaugural Address can be found in Essays on Equality, Law, and Education, J.M. Robson ed. (University of Toronto Press, 1984).