We have studied the solar system for a long time and have detailed 3 dimensional knowledge of all the various bodies in the solar system and how they move in space in relation to one another and also other stars. My question relates to the accuracy of this knowledge. Do we know the accuracy to +/- 1km, 10km, 100km or what? Is the accuracy different for different bodies ? I might expect we have more accurate data for the Earth and Moon than we do for Pluto for example? How can we be sure our error bars are correct?
This one is tricky unless you know the magic term: ephemeris. An ephemeris gives the position of celestial bodies over time. Once you know that one, finding out information about their uncertainties is easier.
The uncertainties are actually rather interesting in that they are planet specific. For example, the dominating factor for Mercury's uncertainty is that its hard to calculate its position in orbit to better than about 1/1000th of an arcsecond (an arcsecond is 1/3600th of a degree). We update our understanding of its path using optical sensors, but its hard to beat down that angular uncertainty. On the other hand, Mars is very easy to predict. We can apparently predict where it will be 1 year later within 300m. Why? Well, we've got a pile of instrumentation that has landed on the planet and is orbiting the planet, so it's much easier to take good measurements!
The article linked above offers a quick snapshot of the known uncertainties on the ephemeris of the planets. They vary wildly. Neptune, for instance, is hard to predict within 1000km 30 years from now!
NASA's Navigation and Ancillary Information Facility (NAIF) at JPL is responsible for knowing the exact positions of all the planets and their astroids, many asteroids, and every space mission bigger than a toy pop rocket. JPL NAIF site
NAIF provides data and software tools as SPICE. The data comes as "kernels" of various types covering natural bodies, spacecraft, instruments on spacecraft, leap seconds and so on. The SPK kernels describe the planets.
The data is all text files, so it can be read using Python, C, Matlab, whatever, without the trouble of fiddling with binary.
In one of the technical notes for the latest SPK, named DE431, published in 2013, comparing it to the previous one, it says: "The difference in the positions of the planets agree to better than 0.001 km over the time period covered by DE430, a difference which is not statistically distinguished by the currently available data."
By "available data" they mean: all the observations by telescope, from spacecraft far from Earth such as Cassini, Juno and New Horizons, Hipparcos, measurements from radio astronomy facilities such as EVLA, VLBA, and ALMA, occultations of stars by planets, and whatever other reliable sources I'm too lazy to look up.
If a one meter difference in data files can't be distinguished by observation, that's no surprise. But the fact that scientists as mission planners care about that level of accuracy, says something about the kind of accuracy we are able to deal with.
Apart from NASA, but thanks to those cubic mirrors left on the Moon by Apollo astronauts, astronomers can measure the distance between certain established reference points on Earth and the Moon to a few centimeters. Could be down to millimeters these days. Differences between these measurements and predictions of various models have helped us reach conclusions such as: the Moon is drifting away from Earth at 3.8 cm/year; the Moon has a liquid core; and once again, Einstein's General Relativity works out fine.
On the other hand, we haven't pinned down the outer planets so well. Pluto's exact position could be off by many kilometers, even after the New Horizons flyby. If you would enjoy reading a detailed analysis of the errors, read this note by W. M. Folkner (PDF)
This question can't really be answered without a timeframe. As @PyRulez implied in the comments, the n-body problem is very complicated. In particular, when n > 2, the system is chaotic, meaning that your error margins will grow exponentially with time. This answer goes into some detail about how far ahead (in theory) orbits may be predicted. The other answer of course is far more practical.