To apply for a divorce in any province in Canada the provincial supreme court must have jurisdiction to hear your case. Jurisdiction is established by either you or your spouse having resided in that province for one year immediately preceding the start of the divorce.
If you do not reside in BC but your spouse does, you can still apply for a divorce in BC. Or, if you reside in BC but your spouse does not, you can still apply for a divorce in BC.
Once the process has been started and stage 1 has been filed in court it is not necessary for either party to continue to reside in BC.