A digital certificate is a way to confirm the identity of a public key owner. Normally, a third party organization, known as CA (certification authority), is responsible for confirming or binding the identity of a digital certificate owner. It is used to establish secure communication between two parties who are unknown to each other or have lack of trust. Digital certificate can assure that the person who you can want to establish communication is actually the person who he claims to be.
So, the main reason of using digital certificate is building trust between two parties who want to communicate securely.