They are synonyms, but opportunity is more formal than chance. The only difference in using them is who you are communicating with. For example, if you wrote a business email or were giving a presentation (= a formal talk), you should use opportunity. If you were speaking to your friends and family, you would probably use chance.
The meanings are the same, but we use them in different situations.