Let G be a closed group of automorphisms of a graph X. We relate geometric properties of G and X, such as amenability and unimodularity, to properties of G-invariant percolation processes on X, such as the number of infinite components, the expected degree, and the topology of the components. Our fundamental tool is a new mass-transport technique that has been occasionally used elsewhere and is developed further here. Perhaps surprisingly, these investigations of group-invariant percolation produce results that are new in the Bernoulli setting. Most notably, we prove that critical Bernoulli percolation on any nonamenable Cayley graph has no infinite clusters. More generally, the same is true for any nonamenable graph with a unimodular transitive automorphism group. We show that G is amenable iff for all alpha < 1, there is a G-invariant site percolation process w on X with P[x is an element of w] > alpha for all vertices re and with no infinite components. When G is not amenable, a threshold a < 1 appears. An inequality for the threshold in terms of the isoperimetric constant is obtained, extending an inequality of Haggstrom for regular trees. If G acts transitively on X, we show that G is unimodular iff the expected degree is at least 2 in any G-invariant bond percolation on X with all components infinite. The investigation of dependent percolation also yields some results on automorphism groups of graphs that do not involve percolation.