/var/log/dpkg.log is the only log file that is left by dpkg itself. It logs which packages are installed, uninstalled, upgraded, etc. It only indicates the package name, the version and the action: dpkg doesn't know the origin of the packages. It does indicate the date of each action.
If dpkg was invoked by a tool in the APT suite (
apt-get, aptitude, Synaptic, …), the actions of APT are logged in
/var/log/apt/term.log. The file
apt/history.log contains the same kind of information as
dpkg.log. The file
apt/term.log contains a transcript of the dpkg run (pre- and post-install and -remove scripts, dpkg run, triggers).
Aptitude also writes a similar log in
/var/log/aptitude. This log contains the actions that aptitude attempted, whether or not they succeeded.
You can also usually determine when a package was installed by checking the ctime of
/var/lib/dpkg/info/$package.*. These files may have a more recent ctime if they were modified later for some reason (e.g. restored from backup).
If you install and enable etckeeper, then every time you run APT and something in
/etc changes, the change is committed to version control. When APT makes a commit automatically after an action, it indicates the action taken (e.g. which packages were installed) in the log message.
There is no tool that logs the origin of the packages. Usually, with APT, a given pacakge always comes from the same source, unless the sources or their priorities have changed. In the rare cases where sources or priorities did change, there is no general way of retrieving historical information about where a package that was installed in the past was obtained from.