|MadSci Network: Astronomy|
This is a good question - it is something that cosmologists worry about. You've probably heard that the universe is expanding; as a result, as you go back in time the density of matter increases. The easiest way to describe this expansion is through the cosmological redshift. It turns out that the density is proportional to the redshift cubed---this is just the amount that the volume has changed. [In other words, density is given by mass within a volume divided by that volume. Mass doesn't change with the Universal expansion, but volume does.] Once we know the matter density today, and the amount the universe has expanded since the cosmic microwave background was generated---which is given by the redshift---we can compute the density then.
We know that the average density of the universe is about 10^-7 hydrogen atoms per cubic centimeter. Our cosmological models tell us that at 300,000 years after the big bang, the redshift was about 1100. So the density at that time was about 10^-7 *1100^3 = 130 particles for cubic centimeter or so. Still a vacuum, but a lot less empty than today!
[As the mass of a hydrogen atom is 1.6735 x 10^-24 grams, the number density quoted above is equivalent to a mass density of 2.18 x 10^-19 kg/m^3. For comparison, the mass density of air at standard temperature and pressure is 1.29 kg/m^3. Moderator]
Try the links in the MadSci Library for more information on Astronomy.