Data collection is extremely important to help with future cost predictions, to assess the current state of a project or organization, to assess the effect of a change in management, process, or technology, and so on. On the other hand, data collection in an obtrusive fashion -- for example, if it requires software developers to do considerable extra work -- is meaningless because its collection affects the data itself. Furthermore, data collected from developers who do not want to provide such data will likely be useless because it is unlikely that an uncooperative developer will provide meaningful data.
The best way to collect data is automatically, with no developer-perceived interference. Obviously you cannot do this all the time for all data, but you should automate data collection whenever you can. However, you must be careful not to cross any lines concerning privacy. Respect your employees privacy and be transparent about what and how you collect.
Reference:
Pfleeger, S., "Lessons Learned in Building a Corporate Metrics Program," IEEE Software, May 1993.