All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
A Muslim must believe that all that happens in this universe is in accordance with the will and decree of Allaah the Almighty. Allaah the Almighty Says (what means): {And with Him are the keys of the unseen; none knows them except Him. And He knows what is on the land and in the sea. Not a leaf falls but that He knows it. And no grain is there within the darkness of the earth and no moist or dry [thing] but that it is [written] in a clear record.} [Quran 6:59]. Allaah the Almighty predestinated this before creating the heavens and earth. On the authority of ‘Amr ibn Al-‘Aas the Prophet, sallallaahu ‘alayhi wa sallam, said that Allaah the Almighty wrote the fate of creatures 50 thousand years before He created the heavens and the earth. [Muslim]
Therefore, if what you mean by “chance” is what the atheists believe: that things occur by accident without the knowledge and management of Allaah the Almighty, then this is disbelief that would take a person from out of the fold of Islam.
On the other hand, if you mean that something happens by accident without your prior knowledge, such as when a person meets a close friend after a long absence and without a pre-arranged appointment, there is nothing wrong with this idea because it involves no negation of the knowledge and decree of Allaah the Almighty.
Allaah Knows best.