According to Canon Law, the local Ordinary (Bishop) must give permission to approach the civil courts for a legal separation.
Chapter II Cases Concerning the Separation of Spouses of Spouses.
Can. 1692 – § 1. Unless lawfully provided otherwise in particular places, the personal separation of baptized spouses can be decided by a decree of the diocesan Bishop or by the judgment of a judge in accordance with the following canons.
§ 2. Where the ecclesiastical decision does not provide civil effects, or if it is foreseen that there will be a civil judgment not contrary to the divine law, the Bishop of the diocese in which the spouses are living can, in the light of their particular circumstances, give them permission to approach the civil courts.
§ 3. If the case is also concerned with the merely civil effects of marriage, the judge is to endeavor, without prejudice to the provision of § 2, to have the case brought before the civil court from the very beginning.
Personally, I doubt that many couples follow this provision of canon law. However, if a couple did not do this and later one party attempted to get a declaration of nullity, there could be a problem is the process was contested.