Almost every time that you apply for an immigration benefit, the government will consider your moral character.
In some cases, you are required to show "good moral character" as an explicit part of the application. For example, for citizenship applications or cancellation of removal for non-lawful permanent residents (a waiver of removal), you must show that you have had "good moral character" for a certain period of time that is specified by statute.
The immigration statute provides a specific definition for "good moral character" at Immigration and Nationality Act Section 101(f), 8 U.S.C. 1101(f). Under the statute, if you commit certain acts or hold a certain status within the statutory period, you may be found to automatically lack good moral character regardless of the underlying circumstances of the event, including:
In addition, under the definition for "good moral character," the U.S. government may also consider other acts that fall outside of the specific statutory period in its consideration of your good moral character and determine whether those show that you have lack good moral character.
In some cases, you may not be specifically required to show good moral character, but it is still effectively considered in the form of other qualifications for the benefit or may be considered in an officer's discretion.
For example, applications for an immigrant or nonimmigrant (temporary) visa do not require that you specifically show good moral character, but they do require that you have not committed certain acts, like certain crimes, fraud, or immigration violations, which constitute grounds to bar you from admission to the United States. These grounds of inadmissibility are thus used to effectively assess your good moral character.
In addition, when considering visa applications, the government may deny you admission as a discretionary matter, even if you are not inadmissible for one of those disqualifying acts, if the officer thinks you have otherwise shown bad moral character. For example, driving under the influence (DUI) offenses generally do not make you automatically ineligible for immigration benefits. However, immigration authorities still take DUI offenses very seriously and may use a record of DUI offenses (especially recent or multiple offenses) to deny benefits in the exercise of discretion.
If you are denied the benefit as a matter of discretion -- that is, because the officer simply questions your good moral character based on negative factors in your background -- it is usually very difficult to appeal the negative discretionary decision.
It is therefore quite important, before you apply for a visa, green card, or other immigration benefit, to know whether the benefit has an explicit or implicit good moral character requirement and what acts might disqualify you from the benefit.
You should also be prepared to address any negative issues in your case, even if they do not automatically bar you from the eligibility for the benefit. It is better to present a strong application affirmatively than try to reverse a negative decision against you.