The Maryland legislature glided to a smooth finish last night, enacting laws that slightly increase unemployment benefits, require motorists to pass an eye exam every four years, and provide funding for a variety of construction projects, including a new jail for Prince George's County.

In the final hours of the session, the House approved a nuclear-freeze resolution, earlier passed by the Senate, and voted $16 million for an open-space program. Across the hall, the Senate struck down, by a 27-15 margin, a proposal that would have, by reducing existing penalties, made it easier for teachers' unions to strike.

The legislation that requires motorists to pass a vision test every four years, when renewing their driver's license, also won 11th hour approval. Motorists can either provide proof from a private physician that they passed an eye exam within the previous year or take an exam as part of their license renewal.

Shortly before the midnight adjournment, the legislators voted to slightly change rules governing the long-delayed vehicle emissions program that goes into effect next January requiring motorists to have their cars inspected annually for a $9 fee. They agreed to reduce from $75 to $50 the maximum that any owner would have to spend to bring his vehicle into compliance with the law that is designed to reduce air pollution in the state's two major metropolitan areas. The action also included a waiver for poor and unemployed persons.

Another measure to win last-minute approval was one that would simplify Maryland divorce law by removing some obsolete provisions and reduce the time required for an contested divorce from three to two years.

Gov. Harry Hughes, having proposed a modest legislative package this year, with few controversial issues, relaxed last night, at one point mingling with legislators and journalists in the Senate lounge. Most of the governor's bills were approved before the closing rush, including his reelection campaign promise to union members that he would create a Department of Labor. One of his ideas that failed was his planned "sin tax" increases on cigarettes and liquor.

Among those watching last night's closing events from the spectators' gallery in the House was former governor Marvin Mandel, who spent nearly two years in federal prison on political corruption charges. Mandel, who also served as House speaker, received a standing ovation from the delegates when he was introduced by House Speaker Benjamin L. Cardin. Later in the evening Mandel trod the hallway outside the chamber, posing for photographs when asked by old legislator friends.

In the last few weeks, the legislature, directed by an experienced speaker of the House, Cardin, and a new Senate president, Melvin A. Steinberg, approved a major banking deregulation measure, a $6.4 billion state budget that avoided new taxes, a new state labor department, and a host of stiffer penalties for drunk driving and murder convictions.

The legislature's orderly finale produced a party-like atmosphere, with heart-shaped red balloons, flower arrangements and corsages everywhere as legislators, aides, secretaries and reporters--relief apparent in their expressions--prepared for night-long session-ending festivities.

In between the party preparations, scores of bills were voted on and legislative conference committees met in hallways and lounges to resolve differences in House and Senate versions of bills.

When the session ended, both House Speaker Cardin and Senate President Steinberg complimented the legislators for an orderly and effective session. "I congratulate the members. . . for achieving a consensus on so many complex issues," said Cardin, who got a standing ovation.

The mild ending was in keeping with much of the three-month session that, with newcomers filling nearly one-third of the legislature's 188 seats, was quickly identified as a quiet one, without major confrontation or delay.

The greatest controversy occurred over the banking measure, which removed many consumer protections and limitations on financial institutions, and over a new state lottery designed to funnel money into cash-strapped Prince George's County and Baltimore City.

The banking measure, which only awaits the governor's signature to become law, produced a new round of debate in the House yesterday when a companion bill was rushed through to correct a technical mistake. Banking opponents used that corrective bill to again attack the banks.

"Let's send a message to the banks that we've had enough," said Del. Joseph Vallario (D-Prince George's), who led the opposition to both bills. "The banking industry has always come down here and been treated fairly. This time they've come back twice." After an hour debate, the measure passed by a vote of 80-41.

The increase in the maximum weekly unemployment benefits and an increase in employers taxes to help fund the benefits had been endorsed earlier by Hughes and approved in both chambers. But the House approved an increase of $7, from $153 a week to $160 and the Senate voted for a $12 increase to $165.

After several days of negotiation by a House-Senate conference committee, both agreed yesterday to a phased-in $12 increase, with the benefits rising to $160 on July 1 and to $165 on December 25.

Among the legislation left for last-day enactment was the $195 million capital budget, which funds construction projects including schools and prisons.