If someonse realized in retrospect that he was passul eidut (witness) at a wedding for not being shomer shabbat – what should he do with regards to the already married couple who may even have children?
If you were designated to be one of the witnesses, and you were at the time disqualified as a witness (for instance, because of public desecration of the Shabbos), many opinions maintain that the couple would not be considered married according to Torah law.
If the couple is observant, you should tell them about it; they would want to make a new kiddushin in front of witnesses, and the children would not be affected. If the couple is not observant, they may not care about their halachic marital status, and there would then be little you can do.
Howver, it is odd that the officiating rabbi (assuming he was Orthodox) would have appointed somebody who is not shomer Shabbos to be a witness. Perhaps the rabbi didn’t know, but it is also possible that there were additional circumstances that would make a difference to the question.
Rema (Even Ha’ezer 42:4), quoting from Rivash (479), writes that even when witnesses are designated, and the witnesses are disqualified, the presence of valid witnesses in the audience is sufficient to validate the kiddushin.
However, many authorities dispute this ruling, such as Mahari Weil (7), Maharchash (Vol. 1, no. 25), and others. This opinion also emerges from the Ritva (Kiddushin 43a), who writes–by contrast with the opinion of Rivash–that the designation of witnesses is significant, and has halachic ramifications (see also Ateres Chachamim 14, who resolves the two opinions).
Some authorities concur with the ruling of the Rema (see Mahari b. Lev 1:102, Meishiv Davar 36, among others), but only to the degree that the married woman would not be permitted to remarry without first receiving a get. Others distinguish between a designation made by the chasan himself, and the designation of the rabbi of other person (see Otzar Ha-Poskim).
Therefore, if the couple in question care about their halachic marital status, they should be informed of the need to repeat the kiddushin ceremony.