Apartment landlords’ use of electronic criminal-background checks to reject prospective renters, some with only minor legal blemishes, drew official rebuke Monday as a potential violation of housing-discrimination laws.

Criticism of the practice has been mounting in recent months as technology has made it possible for apartment owners to perform fast, cheap and wide-ranging criminal background checks with the click of a button instead of scouring records at a local courthouse.

As...