Do quantum fluctuations cause variations in energy density across space? Suppose that the early universe was filled with energy uniformly. Would quantum fluctuations cause variations in energy density across space resulting in regions with higher and lower energy density around the mean?
I read about quantum fluctuations online and still don’t understand how it works so I may have got it all wrong.
 A: No.
"Quantum fluctuations" are not actual fluctuations - at least not if you choose to add any by suitable interpretation of quantum theory and even then, any such interpretation must be consistent with observation and observation is not consistent with the things that actually affect it undergoing real fluctuation.
To explain them requires a bit of an explanation of some very basic, simplified quantum mechanics and quantum field theory. In quantum mechanics, effectively all physical parameters in a system are described by what counts in a sense as a reduced level of information density - formally a nontrivial entropy in all parameters. Such reduced information gives rise to description not in terms of a single value for the parameter but a probability distribution over a range of possible values. A measurement or query of the parameter at a resolution finer than the scale of the distribution will result in a random result as effectively new (classical) information is created about the parameter. (This information both transmits to the querying agent, and furthermore becomes actualized within the system itself.)
The most familiar example given of this is the electrons in an atom. When an electron is "resting" at the bottom of the atom's electricity well, it "fills out" a space due to the position being "fuzzed" out to something described as such a probability distribution with a girth equal to about what we would call as the size of the atom. Each possible position value is assigned a quantum amplitude. The amplitudes are largest near the nucleus, and rapidly fall off thereafter.
In quantum field theory, a field - like the electromagnetic field - behaves in much the same way. In classical mechanics, field quantities have a value at each point in space - e.g. for an electric field, the value is the strength of the field, plus the direction of force, so effectively a vectorial quantity - the directions of these quantities can be traced to form the familiar "lines of electromagnetic force" that you may see in some textbooks and which you can visualize (for the related magnetic fields) with a bar magnet placed under a sheet with iron filings.
When you get to quantization, what happens is that just as for the position of the electron in the atom, the field value at each point in space loses information and ends up as a probability distribution, meaning there is in effect one probability distribution per space point, e.g. it's no longer that we have an electric field of (say) precisely 100 V/m at this point, but an average 100 V/m with a bit of fuzz thereabout.
And just as with the atom with its electron resting at the bottom of the well, when the field is "maximally relaxed", i.e. there is no net force and no waves passing through, i.e. what is called "vacuum state", the probability distributions for the field values at each point are still nontrivial with a slight spread around zero.
This is what is meant by a "quantum fluctuation". But nothing is fluctuating. In a perfect vacuum universe with nothing in it, the ground state field evolves by a deterministic Schrodinger equation. It's only if you were to be there to measure it that you'd notice any sort of fluctuation - if you had an exquisitely sensitive voltmeter that could get below the width of the distribution and held its leads out in the space in front of you (ignoring thermal radiation and all that from your body), you would register a random, but most likely nonzero, field value. However as said above, your measurement creates this information, it wasn't there there before. In the truly empty state, it remains steady at a slightly fuzzy, reduced information version of "zero", and the only thing that happens is the phasors on the probability distributions cycle round and round ... for eternity - a little sad, a little lonely, a little bleak.......
Literally no different from a Newtonian universe with vacuum, or Maxwell's equations with a classical vacuum. The beginnings of the Universe this could not be accounted for by a "quantum fluctuation" from "nothingness". The equations simply don't make that happen. It requires something else to account for it, and what "caused" the Big Bang, or even if it was caused at all and not a true beginning of time, are things that we do not have a way to answer that is not conjecture. Any serious (but still speculative!) theories that posit a prior cause seem to essentially always have a decidedly non-vacuum Universe preexisting this one (e.g. Loop Quantum Gravity features a "Big Bounce" scenario where a previous Universe collapsed on itself.).
On the other hand, that does not mean that quantum effects did not affect the early evolution of the Universe just after the Big Bang. But a quantum vacuum is not "lumpy due to fluctuation". Mathematically it's as uniform as a classical vacuum.
The term "quantum fluctuation" needs to die. A lot of people draw a lot of (and sadly cool-sounding) stuff from it that just isn't there when you finally take a taste of some of the real physics concepts and it's a shame this term gets used by even decent physicists. "Uncertainty/fuzziness in the field values" would be a better description.
ADD: As @John Rennie says in his answer, the fact that the fluctuation happens (according to theory) in the measurer, not in the field, doesn't make it without consequence. You cannot get a universe or non-uniformity forming out of a dead quantum field but you can get the kinds of effects that are at work there affecting processes within a live Universe and that might also include cosmological processes as well since the effects spring from the same mathematical framework. The trick is, of course, to note that a universe with a measurer or agent, is not the same as an empty universe now and thus will be subject to evolution! Nor is it uniform any more...
A: Yes.
Though in fact my answer is going to be essentially the same as the previous answer by The_Sympathizer just with a different interpretation of what exactly you are asking.
The key point I want to make is the same as the one The_Sympathizer makes. The quantum field is not fluctuating. However measurements of the quantum field will in general return fluctuating results. You need to read my answer to Are vacuum fluctuations really happening all the time? for the detailed explanation of this. If you are measuring the energy of a system that is not in an energy eigenstate then your measurement will return one of the energy eigenvalues of the system at random.
How exactly this happens depends on your preferred interpretation of the measurement process, and I don't want to go into that here. However the end result is that if observers in your universe are making measurements of the energy density they will in general get fluctuating measurements.
It is very important to be clear the fluctuations are in the measurement process not the quantum field, but regardless of this those fluctuations are quite real. I give an example in the answer linked above of an experiment where these fluctuations are detectable as electrical noise.
From the comments it's clear that the OP is interested in how the primordial fluctuations arose at the end of inflation. The related question Do quantum fluctuations in the inflaton field lead to fluctuations in the potential energy density? is mentioned. In particular this article by Ethan Siegel is mentioned, and specifically his comments:

If you then require inflation to have the properties that all quantum fields have:
  - that its properties have uncertainties inherent to them
  - that the field is described by a wavefunction
  - and the values of that field can spread out over time

We need to be clear that the mechanism by which inflation occurred is unknown. We don't know what caused the inflaton field nor how it decayed to its ground state as inflation ended. However that decay is roughly analogous to a measurement process, that is in principle the inflaton field can exist in a superposition of the excited and ground states entangled with the other quantum fields that the inflaton can interact with. However we expect that this will decohere then collapse in accordance whatever interpretation of quantum mechanics you favour. This collapse will be random so we expect that it will produce different results in spatially separated parts of the universe i.e. it will produce the primordial fluctuations.
As I emphasise at the start of my answer this isn't fluctuations in the inflaton field, it is fluctuations in the interaction of the inflaton field with other quantum fields. Nevertheless it does produce fluctuations in the observed energy density.
Though Siegel doesn't make it clear (his article was, after all, a popular science article) it seems likely to me that this is what he meant.
A: 
Suppose that the early universe was filled with energy uniformly. Would quantum fluctuations cause variations in energy density across space resulting in regions with higher and lower energy density around the mean?

The inflation period and the inflaton field were proposed in order to explain the high uniformity of the cosmic microwave background, to a level of 
$10^{-5}$, among other observations. The small inhomogeneities observed below that level, are explained by quantum fluctuations at the time of the inflation period.

At the time of inflation, there are no observers, only interactions of fields. The inflation model assumes perturbations in the metric (see link above) at that period . The wikipedia article  on cosmic inflation states 

It explains the origin of the large-scale structure of the cosmos. Quantum fluctuations in the microscopic inflationary region, magnified to cosmic size, become the seeds for the growth of structure in the Universe 

it refers to quantum fluctuations as 

quantum fluctuation (or vacuum state fluctuation or vacuum fluctuation) is the temporary change in the amount of energy in a point in space, as explained in Werner Heisenberg's uncertainty principle. 

The map of cosmic microwave backround is the "measurement" of the fluctuations at the time of inflation. Certainly space time is perturbed during inflation and the cosmological constant allows for energy fluctuations, which are reflected in the CMB map, a snapshot of the universe at the time of photon decoupling (to come in line with the other answers)
