I would like to know what in the Donaldson's proof make it work only for Riemann surfaces.

closed as not a real question by Yemon Choi, Kevin Walker, Chandan Singh Dalawat, Deane Yang, Qiaochu Yuan Jan 18 '12 at 7:17
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
Briefly speaking the answer is because moment map for the action of gauge group is CURVATURE in 2d and (hence moment level = 0 you get FLAT connections) and in higher  dimensions the appropriately understood moment map will have form curvature*omega^n , where omega is the kaehler form and so what you get is related to antself dual connections in 4d and to something wellknown (but I do not remember) in higher dimensions. Some more details. Actually from some point of view you are not quite right. Actually in moral sense it works in higher dimensions  but what you get is not flat connections but (anti)  selfdual connections and what you get is UlenbeckYau (??) theorem that moduli of holomorphic bundles is the same as moduli and moduli space of (anti)selfdual connections. May be it worth to understand the moral of the proofs which is quite simple and then it clarifies the conclusions. The key idea for understanding  is the following finitedimensional fact: Let G  be complex semisimple group, U  its compact subgroup, M  kaehler manifold. Then M/G = M//U where "//" is symplectic reduction. This is a quite nontrivial fact. All theorems above are applications of the above principle in infinitedimensional setup. When you consider M  moduli space of all smooth connections on some manifold N. G  is "gauge group"  group of smooth automorpisms of vector bundle. U  is subgroup of some orthogonal automorphims ( you need to choose metric on your bundle). Since evrything is infinitedimensional you cannot apply theorem above directly, but you as a guidence principle it works and people were able to overcome infinitdim. difficulties and get the desired results. PS I am not sure I presented details correctly, but idea I am sure is correct. Most of this I heard from Misha Verbitsky  may be if You alert him about this question he will answer you here (as you can see now he is not often on MO). 

