Usually you should deposit the “author's final version.” This term refers to the author's final, accepted manuscript after peer-review but before the publisher's copy-editing and typesetting.
The UC open access policies name the author’s final version as the version to deposit.
For articles not covered by the UC open access policies, the author’s final version is the version most commonly preferred for deposit by publishers.
Some publishers allow, or prefer, the final publisher-formatted PDF version for deposit. If this is the case, it will be reflected in your publication agreement. The SHERPA/RoMEO database maintains information about and links to journal publication agreements if you cannot locate your publication agreement. They also have a list of publishers that welcome deposit of publisher-formatted PDFs.