If a US citizen marries an illegal can they become a citizen or a legal resident even though they have a criminal record?

No, marrying a U.S. citizen does not automatically convey permanent residency or citizenship. The proper procedures for obtaining resident status will need to be followed by the non-citizen, the issue of a criminal record may play a significant part in a decision by the USICS. (www.usics.gov)