Women and minorities have made substantial gains in becoming state and federal judges, while women have continued to rise in the leadership of the nation's largest law firms, according to recent studies.

Minorities and women also are more likely to make it to the bench in states where judges are appointed rather than elected and do better in reaching the federal bench, where judges are appointed, according to surveys cited in the National Law Journal.

About 17 percent of the nation's 761 federal judges are minorities and/or women while 12.6 percent of the country's 12,000 state court judges are women, blacks, Hispanics or other minorities, the weekly legal newspaper said.

The number of female state-court judges apparently has more than doubled since 1980, according to figures cited in the Journal. There were slightly more than 600 female state judges in 1980 but more than 1,300 this year.

Maryland has the highest percentage of black judges of any state, 9.4 percent, while Alaska has the highest percentage of female jurists, 21 percent.

The percentage of female jurists overall is about half the 16 percent figure for female lawyers nationwide, but the percentage of blacks on the bench exceeds the percentage of black lawyers.

Only 2.7 percent of the nation's lawyers are black, but 3.8 percent of state judges and 7 percent of federal judges are black, the publication said, citing various surveys.

The federal percentage is almost entirely the result of appointments by President Jimmy Carter. Of 50 blacks on the federal bench, Carter appointed 37.

The percentage of blacks and women in the federal judiciary is likely to decline in the next few years because President Reagan has appointed far fewer women and minorities, including only two blacks in his first term.

The legal newspaper also said that, contrary to one widely held theory that elections provide minorities their best route to the bench, the opposite seems to be true.

Appointment by a governor or mayor has resulted in a much higher percentage of women and minorities in judgeships -- more than 17 percent -- than partisan or nonpartisan elections, according to one study.

In a related survey of minorities and women at the nation's largest law firms, the newspaper found that the number of female partners rose sharply in the last year while the percentage of black and Hispanic lawyers in those firms remained virtually unchanged.

In addition, there are signs that although women appear firmly established in the legal hierarchy, the number of minorities taking partnership positions in the largest firms is tapering off as the number of minority associates dwindles.

The Journal compiled data on 246 of the nation's 250 largest firms, which employ about 42,000, 7 percent, of the nation's estimated 600,000 lawyers.

About 17 percent of new partners at those firms last year were women. Six percent of all partners now are women, compared with 4.9 percent in 1984 and 2.8 percent in 1981.

Women comprise 30.5 percent of associates, about the same as last year. That percentage virtually assures increasing numbers of women at the partnership level, because firms generally pick the vast majority of their partners from their associate ranks.

But the survey also showed a slower movement of blacks and Hispanics to partnership status. Blacks comprise 1.5 percent of all lawyers in the large firms, a figure unchanged in the last three years. Hispanics comprise about 0.8 percent of lawyers in the surveyed firms, up from 0.5 percent in 1981.

While 8 percent of law graduates are black or Hispanic, only 3 percent of associates at the large firms are members of those groups. In contrast, the percentage of female associates roughly parallels the percentage of women in the law school population in 1981.

The survey also found an increase in Asian American attorneys as many large firms look to the Far East for new business.