Enforcement of the nation’s environmental laws under the Clinton administration has often been haphazard and lax, and many major polluters have been able to operate with little fear of punishment, according to a Boston Globe analysis of seven years of records. Larger companies, particularly those with political muscle, are often treated differently than smaller businesses, according to some prosecutors and environmental watchdogs, and federal prosecutions vary dramatically from state to state. Massachusetts has one of the weakest environmental enforcement records in the country, perhaps in part because John DeVillars, the EPA administrator for New England, became personally involved in cases where members of Congress or their staff lobbied the agency to soften enforcement actions against corporate polluters. DeVillars announced last week that he plans to leave the EPA in January.