There are lots of circumstances one could envision within the very broad question you ask.
It's important to understand that ex-communication is very rare, and that most sin never becomes clear and known. If it did, church officers would not have time for anything else (and would themselves be sinning, by not having time to worship, love their families and serve).
Every circumstance could be different, but remember church governance and discipline are related. Good preaching and teaching of God's word, informal social interactions, all have an effect on reproving sin.
It's also difficult because we can't be for sure if, for example, two young people are really Christians. They both may be immature, new converts or they may have been carried along by common grace.
But whatever case, once married, it stands for life. The ministry for life for the believer in marriage with an unbeliever is to so live the Gospel that God will use the difference Christ has made in the believer to redeem the unbelieving spouse.