You can find source code (and sometimes pre-built executables for some platforms) for obsolete versions of Bitcoin core (previously just known as bitcoin-qt or bitcoin) at these locations:
From version | To version | Repository |
---|---|---|
– | 0.1.0 | zorinaq.com currently has source for v0.1.0 |
0.1.x | 0.10.x | the Internet Archive, also known as The Wayback Machine, has source code for many versions (e.g. 0.8.4) that used to be stored at Sourceforge but which are no longer available there. |
0.10.0 | current | GitHub has source code for releases from at least v0.10.0 to the current version (28.0 at time of writing) |
As people have commented: if you want to open an ancient wallet file, you don’t need an old version of Bitcoin, the current version should be able to open old wallets.
To compile older versions on modern operating systems requires extra work. This is at least partly due to changes in shared libraries etc. See AChow’s notes on Building Old Bitcoin Core Releases