Commuter airlines, the small-plane operations that have provided many communities with scheduled flights after major airlines were permitted under deregulation to withdraw service, had their safest year in 1982, the National Transportation Safety Board said yesterday.

That represents a major swing in just three years.

In 1979 the safety board viewed the commuter airline safety record with great alarm, and urged the Federal Aviation Administration to beef up surveillance of commuter operations, which the FAA did. Scheduled commuters had four fatal accidents last year that killed a total of 13 people.

That represented a fatal accident rate of .21 per 100,000 flights. In 1979 there were 66 fatalities in 15 accidents, and the rate was .8 per 100,000 flights.

The fatal accident rate for commuters was higher, however, than that posted by major U.S. airlines.

They had five fatal accidents last year that killed a total of 235 people and an accident rate of .08 per 100,000 flights.

Last year was a bad one for the airline industry because it contained three major fatal accidents--the Air Florida crash here, the World Airways accident in Boston and the Pan American crash in New Orleans.

That made 1982 the worst year for the airlines in terms of fatal accidents since 1978, when the rate was .1 per 100,000 flights.

In terms of total fatalities, 1982 was the worst year since 1979, when 351 people were killed, including 273 at Chicago in the nation's worst plane crash.

That accident, in May, 1979, was the last fatal scheduled airline crash in the continental United States until the Air Florida crash in Washington last January.