Why did formation of the first stars (population III) not happen earlier? Was it the cooling of the universe? Naively, I would expect the lowering density to work against star formation.
 A: We can't observe the population III stars directly so our knowledge of them is based upon computer modelling. The modelling shows that the main problem is getting the collapsing clouds of hydrogen to cool enough to become dense.
It might seem a bit odd to require that the clouds cool, because after all we want the forming star to get hot enough for fusion to start. The trouble is that we need massive (much more massive than a single star) gas clouds to become dense enough for star formation to start. For this we need a way for the collapsing cloud to shed energy, but hydrogen atoms aren't very good at this and the early universe was mostly hydrogen and helium with only trace amounts of heavier atoms.
In today's gas clouds the cooling is mainly due to molecules and heavier elements. The mechanism is that collisions excite rotational, vibrational and electronic states, and these decay by emission of photons. The end result is to radiate away the kinetic energy (i.e. heat) of the cloud.
In the early universe this couldn't happen because there weren't any molecules or heavy elements. Localised cooling only became possible when the average temperature became low enough for hydrogen molecules to form. Once hydrogen molecules built up to a significant level they could start converting kinetic energy to photons so it could be radiated away.
And that's what set the timescale for the first star formation. The average temperature had to fall enough for hydrogen molecules to form.
