The two largest organizations of elderly Americans voted yesterday to inject competition into the sale of insurance to their 12.5 million members by ending a controversial arrangement under which the Colonial Penn Group (CPG) of Philadelphia has monopolized access to their names for 30 years.

In reportedly the largest single transaction in insurance industry history, the boards of directors of the affiliated, nonprofit National Retired Teachers Association (NRTA) and the American Association of Retired Persons (AARP) chose the Prudential Insurance Co. of America to underwrite their health insurance program starting June 30. About 2.5 million members are enrolled in the program, which will continue its coverage without interruption.

The action involves huge sums. Last year alone, CPG, whose exclusive ties to NRTA-AARP enabled it to become one of the most profitable large corporations in the nation, collected health-insurance premiums of $244 million from AARP members and $26.6 million from the much smaller NRTA. CPG's 1979 consolidated revenues -- about 80 percent of them deriving from sales of various types of insurance and other products to the associations' members -- were $751,825,000. After-tax net income was $71,744,000.

CPG and two other insurers, Allstate and Metropolitan Life, lost out to to Prudential, the nation's largest provider of group health insurance, in a competitive bidding process that began nine months ago with invitations to 62 companies to participate.

Cyril F. Brickfield, executive director of the associations, said that the "exhaustive" process resulted in the selection of a carrier, Prudential, which will "maintain and improve the quality and service of our group health program."

Prudential committed itself to pay to claimants at at least 75 cents of each premium dollar -- nearly 15 cents more than the historic average paid by CPG. Allstate agreed to pay at least 70 cents, the minimum in the bidding specifications, and Metropolitan at least 72 cents. CPG, under complex formulas, initially proposes to pay 67 to 73 cents and then 73 to 76 cents.

Prudential also will pay 5 percent of gros premiums to the associations as "administrative allowances." The losers had agreed to do the same.

All of the final bidders but CPG met requirements for a flat five-year contract and for total control by NRTA-AARP of the computerized lists of members enrolled between June 30, 1981, and July 1, 1986.

Under the existing setup, the names of all NRTA-AARP members -- about one in four of all Americans 55 and older -- have gone into the computers of a CPG subsidiary so that they could be used for promotional mass mailings.

As part of a series of steps to sever their ties with the company, the associations have been building duplicate files under the control of their national headquarters in downtown Washington. Now, however, Prudential alone will have access to the names of persons who join the associations during the life of the contract.

CPG will be barred from citing its former relationship with the associations in the promotion of any of its offerings. But it retains the right to keep and use its lists of the 12.5 million present members.

As a practical matter, this forecasts a probable head-to-head rivalry in which CPG will seek to persuade its health policyholders to stay with it while Prudential tries to lure them away. In addition, CPG remains free to go on selling auto, home and life coverage to NRTA-AARP members.

In Philadelphia, CPG Chairman John J. MacWilliams expressed confidence that many current health policyholders will stay with his firm and that it "will be able to compete successfully" in that field.

In Newark, N.J., Prudential chief executive Robert A. Beck, "gratified" by winning the contract, said, "We believe it enhances our role as a total insurance provider."

Health insurance for the elderly was a largely untapped market until an insurance broker, Leonard Davis, now CPG's largest stockholder and the honorary president of the associations, began, initially through NRTA, to develop it. The close ties he fostered between the associations and the company eventually precipitated public status accorded NRTA-AARP by the Postal Service and the Internal Revenue Service, and lawsuits.

One of the suits, pending in Superior Court here, was filed by AARP former executive director Harriet E. Miller, who claims she was improperly dismissed and who seeks damages from Davis, AARP, CPG and others.

In a statement on her behalf yesterday, her lawyer, Philip J. Hirshkop, termed the Prudential contract "a major step forward . . . in securing reasonable insurance benefits" for the elderly. He also said he believe the lawsuits "have directly contributed to this result" as well as to earlier steps to end "improper" relationships, such as abolishing CPG's exclusive access to association publications.