How can we tell if something is really God’s plan or just a coincidence?
It is hard to answer questions of this sort in the abstract, or even using hypothetical examples. It would be far better if you can state a real, concrete example.
But to answer your question in the abstract, philosophically speaking, if we posit the existence of a benevolent omnipotent Creator, then necessarily there is no such thing as a coincidence, at least not objectively, not absolutely.
If God is one, good and all powerful, then all things and happenings are necessarily either a good that He wills directly, or an evil that He permits because He is going to bring out good through it.
It is only a “coincidence” relative to us, since we cannot see where it came from nor where it leads.
The question we must ponder is not if something is from God or if it is merely a coincidence. It is rather if it is willed by God or permitted by God, what is God’s plan in it?
And the answer, more often than not, is not what meets the eyes. It is often more personal, more profound. Until we come before the Lord and express our desire to know His Will over time, we cannot hear it. My heart must be open in trust first.