Last year, a state legislator from South Windsor, Conn., threw into the hopper a bill he thought had little chance of passing.

Not only did Connecticut adopt the statute, but it has become such a hot legislative idea that so far 16 other states have passed their own versions. The measure is a stick with which to beat automobile companies that deliver new cars that are both defective and difficult to make right.

Very simply, the new laws say that if the car manufacturer and the dealer, working together, cannot correct a defect in a reasonable amount of time, the buyer must be given either a brand new car or a refund of the purchase price. The reasonable amount of time is usually defined as four tries to correct the same problem or a total of 30 days in the shop during the warranty period for a combination of all problems.

But some states are tougher: Minnesota says the car has to be replaced if a major safety hazard develops--a failure of the braking or steering system--after even one attempt to fix the problem.

The state lawmakers are jostling each other to get aboard the "lemon law" bandwagon because they sense a lot of dissatisfaction among new-car buyers.

New car buyers have been showing that unhappiness by increasingly going into court and suing the manufactur ers and dealers for damages, using a whole variety of legal weapons. Specialists in "lemon litigation" have developed: Robert S. Dazin of Detroit has handled dozens of such suits, and locally Alan H. Freedman and Mark H. Steinbach in the District and Thomas A. Appel in Baltimore have been active. The Center for Auto Safety actively encourages such cases, and publishes a manual for lawyers on how to wage such court battles and a file giving details of almost 200 cases, cross-indexed by car make, defect, and state.

Included in the file is the story from Prince William County, Va., of a 1979 Chrysler New Yorker that was in the shop four times, for a total of about a month, without solving, the owner claimed, a transmission vibration problem. The jury returned an award of $12,704.60. In an Alabama case, the jury ordered a payment of $9,138.72 to the owner of a 1981 Volkswagan Vanagon which continued to suffer power losses after 33 days in the shop in four separate repair attempts.

The Center's compilations suggest that car owners win about 90 percent of the cases that go to trial, but that it is much more typical for the auto companies to settle such suits before they get before a jury. The average settlement of the cases reported to the Center was $6,035, although the biggest was some eight times that amount. Attorneys typically walk away with fees in the $5,000-to-$6,000 range, paid by the auto companies over and above what the plaintiffs are awarded.

That trend is one reason why Detroit has not fought very hard against the new surge in state lemon laws. By defining just how long the industry should have to correct a defect, the new statutes can even give the companies a defense against car buyers who are too quick to sue.

Industry lobbyists also have seen that, while the measures are too popular to stop, if they agree to the idea they can have some hand in shaping the legislation. Most of the state laws, for instance, have a reduction in a purchase price refund of some per-mile charge for the time the owner drove the defective car. And there have been other little victories: in Florida the owner with a problem cannot take it just to the dealer, but must inform the manufacturer in writing. And in Wyoming and Montana, weekends and holidays do not count towards the 30 days that mechanics have to get the car in tip-top shape.

Even more significantly, the laws typically require consumers with car problems to go through an arbitration procedure before invoking the new laws. The industry is already putting such arbitration panels into place, and they are molding them to conform with the new laws.

General Motors, for instance, follows a policy requiring the car owner to promise in advance to accept an arbitrator's decision; since the new state statutes do not require consumers to make such a promise, GM is dropping that demand in states with lemon laws.

A car owner is still faced with a dilemma when a arbitrator offers something less than a full return. The state law may say that the car company has to deliver a new automobile, but enforcing that may take time and run up lawyers' bills--especially since so far there has been no litigation under the new laws, and therefore no precedents. "There's no easy solution to the problem of having a car that doesn't perform as expected," admits Steven Boggess, executive assistant to Joseph L. Bruno, the chief sponsor of the lemon law in the New York legislature.

The real goal is to avoid lawsuits, not to spur them. And the new laws may be doing just that. According to Evan W. Johnson, a lawyer at the Center, initial indications from California suggest that since that state adopted a lemon law last year, "dealers and manufacturers are paying more attention to doing repairs right the first time."