It depends.
If your work is a scholarly article covered by a UC open access policy and you have not waived the policy, the policy gives you the right to deposit the article in eScholarship. You can find more about the UC open access policies at uc-oa.info, including a list of Frequently Asked Questions.
If you would like to deposit something that is not covered by an open access policy and you have signed a publication agreement, you should consult your publication agreement to see what rights you have retained.
If you cannot find your publication agreement, or it does not give you sufficient rights to deposit a work in an institutional repository, contact your publisher.