It depends on the jurisdiction where the marriage was concluded and on the jurisdiction where citizenship is sought.
In the United States, immigration and citizenship are controlled by federal law while marriage is not. Therefore, federal law says nothing about the validity of the marriage, but it prevents the parties in such a marriage from petitioning for immigration (8 USC 1154(c)):
no petition shall be approved if (1) the alien has previously been accorded, or has sought to be accorded, an immediate relative or preference status as the spouse of a citizen of the United States or the spouse of an alien lawfully admitted for permanent residence, by reason of a marriage determined by the Attorney General to have been entered into for the purpose of evading the immigration laws, or (2) the Attorney General has determined that the alien has attempted or conspired to enter into a marriage for the purpose of evading the immigration laws.
Furthermore, entering into a marriage for the purpose of evading immigration laws is a felony under 8 USC 1325(c).
Whether the marriage itself could be invalidated is a complex question depending on where the marriage was concluded and on where the couple resides. For example, if the couple had been married in Switzerland (covered in another answer), would the desire to circumvent foreign immigration law satisfy Switzerland's definition of Scheinehe? If so, could the marriage be invalidated in Switzerland? If so, could it be invalidated in Switzerland even if neither party to the marriage were Swiss nor any longer a resident of Switzerland?