This phrase means 'when' or 'at the time of'. You use it for special moments. It is a polite way to say 'no toki ni'.
、へ、に。
Next time you have the occasion to come to Kyoto, please do stop by our house.
、に。
On the occasion of my business trip the other day, I got the chance to greet the company president directly.
、。
On an occasion when you are not busy, might I ask if you could spare some time to talk?
、。
Thank you very much for the gift from the occasion of your visit.
、。
I plan to submit the detailed plan at the time of the next meeting.