Robert P. Hunter, the senior member of the National Labor Relations Board, announced yesterday that he will leave the agency when his term expires in August.

The departure of Hunter, a Republican, means the loss of a key ally for NLRB Chairman Donald L. Dotson. The two men frequently sided together in controversial 2-to-1 decisions during a 22-month period when the board had only three or four members.

Under the Reagan administration, the NLRB has been strongly criticized by organized labor for what the unions see as its strong pro-management tilt in decisions dealing with the rights of individual employes and unions. But Dotson, Hunter and their supporters contend that the Reagan board has merely restored balance to what they viewed as the board's pro-labor stance under previous administrations.

NLRB decisions in the past several years have generally expanded management's rights on such key issues as shifting work from union to nonunion plants and opposing unionization efforts.

Hunter's departure creates the opportunity for a possible shift in the board's approach because it coincides with the arrival of two new members -- Republican Wilford W. Johansen and Democrat Marshall Babson -- who are regarded as more moderate than Dotson and Hunter. The fifth member is Patricia Diaz Dennis, a Democrat.

"I would hope the Reagan administration has seen it has created a tilt in the balance too far toward the employers' side, and I hope they come to their senses and appoint someone more middle-of-the-road," said George Murphy, chief counsel of the 1-million-member United Food and Commercial Workers Union.

"I am delighted he Hunter is leaving," Murphy said. "I think his decisions have been absolutely horrible, and he has been part of a group that has done whatever it could to turn the labor laws in favor of employers and against employes."

Rep. Barney Frank (D-Mass.), chairman of a House manpower subcommittee that oversees NLRB operations, said Hunter has been the "most loyal supporter of Donald Dotson in the transformation of the NLRB into a fundamentally anti-union entity."

"Obviously, we disagree," said Charles M. Williamson, Dotson's chief counsel, who described Hunter as "one of the most productive" members on a board whose decisions have been upheld in nearly 85 percent of cases appealed to federal courts.

Hunter, who was in Europe and not available for comment, said in a letter to President Reagan that the NLRB, "under the able leadership of Chairman Dotson, has restored a reasonable balance in interpreting our chief labor law . . . . American workers continue to be vigorously protected in their freedom to join labor unions and to refrain from joining."

Over the past few years, the board has been criticized by both labor and management for a record backlog of cases involving unfair labor practices, a situation that resulted in delays of more than three years in resolving some cases. Since late last year, however, the backlog has been reduced.

Part of the reason for the delay was the failure of the White House to move quickly to fill board vacancies, officials said. White House personnel officials were not available for comment yesterday on plans to fill Hunter's seat. NLRB members serve five-year terms.

Hunter, formerly a key aide to Sen. Orrin G. Hatch (R-Utah), was chief counsel of the Senate Labor and Human Resources Committee before Reagan appointed him in 1981 to fill an unexpired term on the board. Hunter plans to join the Washington office of the New York law firm of Proskauer, Rose, Goetz & Mendelsohn