The Carter Administration yesterday cleared Mexican vegetable growers of charges they have been selling winter tomatoes and other vegetables in the United States for less than the cost of production.

If the decision had favored a group of Florida vegetable growers who filed the "dumping" complaint against the foreign growers, the Mexicans might have had to pay special import duties that could have pushed up the prices of those vegetables in supermarkets and hurt the administration's recent anti-inflation efforts.

The decision, rendered by the Commerce Department, immediately brought charges by the Florida growers that the decision was politically motivated. Commerce officials denied the charge.

The Florida growers will appeal the decision to the U.S. Court of Customs, said attorney Howard Feldman, who represented the Florida groups.

"We're going into the U.S. Customs Court very shortly to get what we feel is the first objective determination," Feldman said. "There are political decisions that dictate a conclusion against us."

A ruling favoring the growers would have jeopardized the administration's attempts to placate the Mexican government over issues such as immigration and that country's natural oil and gas supplies, Feldman said.

Although there is no evidence that Commerce made its decision for political reasons, said William D. Rogers, attorney for the Mexicans, "I'm sure it will have a salutary effect on Mexico."

The Florida vegetable growers, who share the winter market about equally with the Mexicans, claimed in an antidumping petition filed in 1978 that about $200 million worth of the vegetables were being dumped in the United States every year.

Feldman contended that the prices offered by the Mexicans had "driven" many of the Florida growers "out of business. Several hundred farms just went out of business. You can see people in the fields who used to own farms."

The complaint was originally filed with the Treasury Department. The Florida growers withdrew their original petition asking for relief last July to give the U.S. government time to try to negotiate with the Mexican government on setting limits on low-priced vegetable imports.

The complaint was refiled last October and several days later Treasury tentatively cleared the Mexicans of dumping winter tomatoes, cucumbers, eggplant, peppers and squash products that constitute one-half of winter vegetables consumed by Americans, the Commerce Department said.

The Commerce Department received final jurisdiction over the case, however, when it gained authority over antidumping disputes as part of the administration's reorganization of trade functions.