It does not violate any law. A civil suit has no bearing on a person's eligibility to run for any office, including of a HOA association, to manage any organization, to sign or enter into contracts (such as might be required by a board member), etc. It is possible that this might violate the association's own rules or bylaws, since it would legal if those documents prevented somone from running for the board if another owner filed suit against them, but that is a matter of your association's own government documents; there is no general legal bar against this.