The Senate Judiciary Committee approved a major immigration bill yesterday that would give legal status to many aliens now illegally in the United States and provide tough civil and criminal penalties for employers who knowingly hire illegal immigrants.

The vote was 12 to 4, with all 10 Republicans favoring the bill.

One major committee change -- a provision for guaranteed amnesty within three years after enactment of the legislation -- had the support of the bill's chief sponsor, Sen. Alan K. Simpson (R-Wyo.).

The original bill provided for a commission to consider amnesty once it determined that tougher enforcement of the immigration laws had curtailed the flow of illegal aliens. But it contained no automatic legalization program.

"Legalization will take place," Simpson said, possibly beginning before the three-year deadline. "This assures it will come. Never had I wanted to believe we will not have legalization. We might find it ready to go in 18 months."

While the legislation would grant amnesty to qualified aliens who entered the United States before Jan. 1, 1980, it also attempts to reduce the flow of illegals into the United States by making it illegal for employers to knowingly hire them.

Opponents, including Hispanic groups and the American Civil Liberties Union, have charged that some employers will use the sanctions as an excuse to discriminate against Hispanics who are American citizens or legal aliens.

They have also claimed that the legislation would create an army of slave labor during the three-year interval between the time employer penalties go into effect and the amnesty plan starts.

Wade Henderson of the ACLU complained that illegal workers now in place will be at the mercy of their employers and the U.S. Immigration and Naturalization Service, in a "limbo status" with no legal protections for up to three years after the bill is enacted.

But Simpson said he does not expect conditions in that period to be worse than they are now. "Nothing could be worse . . . . These poor, ragged bastards will know for the first time that legalization is coming . . . . That is what they yearn for, what they pine for, what they write me for . . . , " Simpson said.

Among other amendments approved yesterday was one by Sen. Paul Simon (D-Ill.), also supported by Simpson, to set up a six-month commission to consider a long-term cooperative effort for the United States and Mexico to improve the Mexican economy and to stop the flow of people across the border.

"We can pass a dozen bills . . . but if the economy of Mexico does not improve, we're going to have a massive immigration problem," Simon said.

The bill, which may move to the Senate floor by September, provides more than $800 million in new funding in 1986 and a similar amount in 1987 for additional Border Patrol officers, as well as additional funding for the Labor Department to enforce the employer provisions.

The major House immigration bill, sponsored by Judiciary Committee Chairman Peter W. Rodino Jr. (D-N.J.) and Rep. Romano L. Mazzoli (D-Ky.), would permit simultaneous amnesty and employer sanction provisions, including criminal and civil penalties.

The House bill would apply to fewer people -- giving temporary legal status to illegal aliens in this country before Jan. 1, 1982.

Concerning penalties, Simpson originally proposed a range of civil fines, with a maximum of $10,000 per illegal alien for employers knowingly engaging in a pattern and practice of hiring undocumented workers.

The new provision, proposed by Sen. Howard M. Metzenbaum (D-Ohio), would add criminal penalties of up to a $3,000 fine per illegal alien and six months in prison for repeat violators.