In general, the distances to deep-sky objects are not known very accurately. This is particularly true of nebulae, where professional astronomers' distance estimates frequently vary by a factor of two or three, and occasionally much more.
Angular sizes are equally hard to pin down, but for a different reason. Few deep-sky objects have well-defined edges that can be measured objectively. For instance, deep photographs show that M42 and M78 are actually two bright areas within a huge luminous cloud that covers most of Orion, and it's a judgment call where to draw the boundaries within this super-nebula. So published diameters for M42 vary anywhere from 30' to 1.5° or more.
The primary data source for this article is the website of the Students for the Exploration and Development of Space (SEDS), which has lots of information on the Messier objects and a selection of interesting non-Messier objects. The SEDS data is generally quite good, but as with most amateur sources, there's some variation in quality. So everything was cross-checked with other sources whenever possible.
The Catalogue of Milky Way Globular Cluster Parameters, published and maintained online by William E. Harris (McMaster University), is generally considered to contain the most authoritative data on globular clusters. We used the Harris distances in the rare cases where they disagree with the SEDS distances.
WEBDA, by Jean-Claude Mermilliod and Ernst Paunzen, collects data from many professional sources on open clusters. The index page to each cluster's information gives a summary of the clusters vital statistics, including distance and visual magnitude. However, this does not always reflect the latest widely accepted value.
The NGC/IC Project database is an excellent source for historical and observational data but contains no distances.
SIMBAD is a general index to the papers in professional astronomy journals containing information on any given object. It often includes summary information on each object's primary page.