The Department of Housing and Urban Development has agreed to pay nearly $60 million to more than 500,000 tenants of federally subsidized, low- and moderate-income apartments whose rents were boosted by tax and utility -rate increases from 1975 to 1977.

The agreement settles at least 45 suits filed after a former HUD secretary, Carla Hills, refused to implement a congressional mandate to increase tenant subsidies ot offset rents increased because of higher taxes and utility costs.

"The position of the department was always that it was an administrative nightmare," according to Kathleen MacKay, a HUD lawyer. She said Hills felt that the program was "poorly thought-out" and that Congress did not appropriate enough money for it.

MacKay said that when the Carter administration assumed power, it was decided that the best way to settle the suits was to turn the money over to the groups suing on behalf of the tenants, while requiring them to administer the payments so that HUD would not have additional administrative costs.

James Sturdevant, a California lawyer who represented some fo the Connecticut tenants affected by the settlement when he worked in that state, said the sum is one of the largest idrect benefits ever provided to poor people. The tenants affected by the ruling generally earned less than $15,000 annually.

Under terms approved here yesterday by U.S. District Court Judge John H. Pratt, the tenants will get lumpsum cash that, depending on individual circumstances, may total as much as $1,000.

If the program had been implemented under Hills' tenure, the payments would have reached the tenants only indirectly, applied by landlords against the rents.

The affected tenants are those who lived in housing projects subsidized under HUD's Section 236 program anytime from Feb. 1, 1975, to Sept. 30, 1977. The Section 236 program financed apartment construction at low interest rates, with the idea that developers would then set low rents for tenants because their construction loan interest rates were low. One such project was the Immaculate Conception Apartments at 1330 7th St. NW.

To qualify for the rebates, tenants must show they paid in excess of 30 percent of their adjusted gross income for rent in the 1975-77 period. The extra rental amount that is attributable to the tax and utility increases will then be refunded.