New York City lay helpless today, stiller than on a holiday, waiting for Consolidated Edison to knit together the power system that unraveled and plunged 9 million people into darkness after several lines were hit by lightning bolts Wednesday night.

After 21 hours, almost 25 per cent of Con Ed's customers - those in parts of Manhattan and the Bronx - were still without power, and some New Yorkers feared a second night without electricity.

Mayor Abraham D. Beame denounced Con Ed, holding it responsible for the power failure which gave looters and arsonists a field day in some of the city's slum areas.

"We have seen our citizens subjected to violence, vandalism, theft and discomfort. The blackout has threatened our safety and has seriously impacted our economy," Beame told a news conference.

In what may have struck many New Yorkers as hyperbole, the mayor, who is waging an uphill fight for re-election, said the city had been subjected to "a night of terror."

President Carter pictured the blackout as a harbinger of a United States without adequate supplies of energy. He sent a memo a Federal Power Commission Chairman Richard L. Dunham calling the blackout " another dramatic reminder of the total dependence of this nation on reliable energy supplies."

Calls for investigation came from all sides. Carter instructed the FPC to determined how a system with supposed safeguards could fail so completely.

Beame appointed a special three-man board of inquiry with subpoena power. He indicated that he already has a good idea where the blame lies by accusing Con Ed of "gross negligence."

"We cannot tolerate in this age of modern technology a power system than run stunt down the nation's largest city," the mayor said.

Gov. Hugh Carey announced he was sending 250 state troopers into the city to assist weary New York police, who have been working around the clock, but he declined to call up the National Guard. Carey said a state Public Service Commission task force would investigate.

Con Ed board Chairman Charles F. Luce told a news conference that a lightning bolt knocked out the large Indian Point 3 power station, starting an hour-long snowball effect. "And our system went down with a crash," Luce said. He promised a Con Ed investigation that would inquire into the possibility of human error.

Beame and other city officials said Con Ed had promised that it couldn't happen again after the November, 1965, blackout, but Luce said he never gave a guarantee.

Four days ago, however, Luce told a TV interviewer who asked how Con Ed would fare if the city ran into prolonged hot weather:

"I can guarantee that less than in the past 15 years and less than in other cities . . . I can't guarantee that it won't possibly happen, but I don't think it's going to."

Luce apologized to New York residents for "the pain and suffering this blackout has caused this community," but he strongly denied Beame's charge of "gross negligence."

Asked by reporters whether he expected Con Ed to face lawsuits, Luce said this is an age of litigation, but that his lawyers advised him that Con Ed would only be liable if gross negligence could be proved.He said he thought it could not.

Early in the day, a Con Ed spokesman called the blackout "an act of God." Insurance policies notoriously exempt acts of God from their coverage, and in East Hariem today owners of burned-out shops bristled at the Con Ed term. Luce declined to apply the act-to-God label at his news conference.

Whoever acted, fewer people were trapped in elevators and subways this time than in 1965, largely because the failure 12 years ago came during the evening rush hour and caught large numbers of people still in their tall office buildings.

This time almost all subways managed to coast or limp into stations, according to transit officials. They said about seven trains were caught in underground tunnels, but transit workers led all of the trapped people out without serious incident. There were no reports of death because of failures of electrically powered machinery.

All day electric power crept across the Con Ed grid, and at 5:30 p.m. the Long Island Rail Road and the subway system began limited service for the first time since the breakdown. State of Emergency

Beame declared the city in a state of emergency just before sunrise, and urged people not to drive into Manhattan today. Most obeyed, and the city's skyscrapers with their stalled elevators were largely deserted.And with the exception of a few intersections, traffic flowed easily despite the absence of traffic lights.

Police and firefighters were the busiest city officials. More than 2,500 people were arrested in connection with looting and vandalism in the first 12 hours without power, Beame said. Prisons Full

Prison capacity was quickly exchausted, and the city got emergency permission from two judges to re-open the famous Manhattan House of Detention, called "the Tombs," and the Brooklyn Adolescents' Center, both previously ordered closed because of their inadequate facilities.

he mayor said he had contacted the administrative judge of the criminal court and been assured that "there's going to be punishment" for the looters. He did not elaborate. Staggering Costs

Throughout the day, officials speculated on the staggering costs to New York of its day without power.

A spokesman for city Comptroller Harrison J. Goldwin said that as much as $5 million in sales and stock transfer taxes were lost. New York, already buried in debt, will face huge overtime bills from police and fire fighters. Its citizens face private losses ranging up to hundreds of thousands of dollars for the larger businesses destroyed by looters and arsonists.

Because New York City is the financial center of the nation, and by some claims, the world, the impact of the blackout was felt far beyond the city's boundaries.

All banks were closed in New York City. The New York Stock Exchange and the American Stock Exchange also kept their doors shut, as did the city's major commodity exchanges.

Outside the city, the Midwest and Pacific Stock Exchanges were the only ones to open for business. But volume was reported to be well below normal because no major stock quotation system was operatings and most brokerage firms are based in or funnel their orders through New York. Computers Down

Without electricity, all of New York's computers were stilled. Banks, large corporations and government agencies use hundreds of hours of computer time to manage their affairs and they are all at least half a day behind. Contrast Dramatized

During the looking police radioed from the worst areas: "They're animals out here. We can't stop them."

A man in east Harlem was asked why he was looting. "Why not?" he replied.

As the 8:27 p.m. sunset approached tonight, the worst remaining problem were in Brooklyn, where a series of fires had followed one another since late morning. Crowds of hostile bystanders in the Bedford-Stuyvesant area interfered with firemen's efforts, and extra police were called in. An angry fire department official said if the area couldn't be made safe: "We leave the area. We let it burn."

The blackout dramatized the contrast between rich New York and poor New York. In midtown Manhattan last night the darkness was a lark for many caught in bars and restaurants. Others were unable to get home or to their hotel rooms on high floors, but for many the worst inconvenience was melting ice and a lack of air conditioning.

In East Harlem and the South Bronx the darkness brought looting and fear.

During the 1965 blackout there was no looting, but last night and today, mobs broke into shops in several of the city's poorest, most crime-ridden areas.

City officials said the temperature appeared to be a major reason for the pockets of violent looting and the fires this time. In 1965, the blackout came in November. The temperature was 37 when the Con Ed system went out this time and has been in the 90s today.

A lot of other circumstances in New York have changed as well.

Civic leaders in Harlem and the South Bronx today called on federal, state and city officials to see the looting as evidence of their young men's despair and their need for jobs. Unemployment in some parts of New York is 80 per cent among young men. Harlem Looting

Along East Harlem's Third Avenue and 116th Street, furniture and appliance stores, liquor stores and pawn shops were almost torn apart by looters who ripped open the iron security grills, smashed through plate glass windows and helped themselves.

Neither widespread arrests nor daylight ended the looting.

At the Simon Furniture Co. in East Harlem, private armed guards with attack dogs arrived early this morning but couldn't stop the looters, according to shop owner Eugene Riback.

At 9:45 a.m., as Riback and his employees took inventory amid the wreckage of their four story business, two thieves picked up a washing machine and headed for the street. A guard pointed his pistol at one of the looter's head from three feet away, Riback said.

"You either kill me or I go out the door with the washer," the looter replied and kept going. THe guard put away his gun. Riback said.

There wasn't much left in Riback's store except broken glass and invoices scattered over the floor, but the veteran of 26 years of doing business on upper Third Avenue still faced potential trouble this morning.

Riback stood inside his store while a small surly, mostly Spanish-speaking crowd stared at him from the sidewalk. "My employees speak Spanish," he said, "and they tell me those guys out there are saying 'Let rush them and take what's left.'" Damage in Bronz

The South Bronx, burned out and vandalized over the past decade, suffered new damage. Although every store along east 138th Street has a heavy roll-down metal door sealing its street front, several were ripped up from the bottom edge like half-opened sardine cans. Other stores were burned out.

This morning about 500 youths milled in front of the National Shoe Store. There was a crash of glass and the crowd surged toward the store. Three police cars wheeled into 138th street and the young men broke and ran - but only far enough to turn and stare back and to wait for the police to leave.

During the night, police responding to looting calls were hit by thrown bottles and bear cans. Arrests failed to disperse the crowd; they were simply too many people in the streets and those who were not arrested went on stealing.

Far from the looting, residents and visitors in midtown Manhattan behaved with the same courtesy and good humor that marked the 1965 blackout.

More than 400 movie-goers decided they would rather stay in Radio City Music Hall than try to get home without subway or rail transportation, so they curled up on the carpet in the immense theater's lobby.

In the fashionable Third Avenue bar, P. J. Clarke's, a capacity crowd sweated in the near complete, darkness, shouting at the bartenders for more beer, and talking of parties, college fraternities, dates, but not of blackouts. Woe at Waldorf

Guests at the Waldorf Astoria and other Manhattan hotels returned from theaters and restaurants to face a choice between night in the lobby or a long climb to their rooms.Elevators were not functioning anywhere in the city.

The Waldorf assigned its security guards to escort groups up the stairs with flashlights. The guards staggered back to get fresh air at the hotel doorways after trips as high as the 45th floor. "For some people it seems awfully important to get to their rooms," one sweating guard said.

The best-equipped people in the Waldorf lobby were three men who had been heading for a backgammon party when the lights went out. They found a corner of the lobby, a couple of candles, spread out their board and played through the night.

At the midtown 17th police precinct, officers parked a three-wheeled scooter on the sidewalk with its headlights pointing through the open door to light the stationhouse. They said there was no trouble anywhere in their generally affluent precinct.

Small groups of people stood or sat around the entrances to midtown skyscrappers at normal opening time between 8 and 9 a.m. But few choose to walk up to their offices. By 10 a.m., most had drifted away and midtown was more deserted than on a holiday. The buildings provided a vast backdrop against which nothing was happening. Emergency Calls

Throughout the day, New York's all-news radio stations broadcast appeals for citizes not to call the 911 telephone number for police, fire and ambulance service unless they faced a real emergency. According to Beame, calls to the emergency number ran 5,000 an hour during the night, but dropped to 2,000 per hour this morning.

Con Ed appealed to all New Yorkers to leave only a single light bulb turned on in their homes and to unplug all appliances so that when power was restored to their neighborhood there would not be an immediate. enormous surge of demand that might once again knock out the system.

Just before the city went black at 9:34 p.m. Wednesday. Con Ed was operating at about 5.8000 merawatts with about 3.800 megawatts generated by the utility and the rest purchased and brought in on tie lines.

Luce said the heavy reliance on outside power resulted from a requirement imposed on Con Ed by its regulators to buy the cheapest power available. He said Con Ed could have been producing the full 5,800 megawatts.

Since the tie line at Indian Point 3, which connects the system to Upper New York State and Niagara Falls, was severed and other connecting lines became overloaded and collapsed, triggering the blackout, the wisdom of using so much purchased power is being questioned. Largest Power Failure

After the 1965 blackout, which lasted only an average of 12 hours in severely affected areas, Con Ed in stalled a "load-shedding" system designed to cut power deliberately up to 50 per cent to the utilities' customers in a crisis. But Luce said the initial lightning bolts knocked out the capacity to shed 15 per cent of load and the remaining 35 per cent capacity was inadequate to prevent the collapse.

New Yorkers had to depend on transistor radios for most of their news of the blackout, the New York Times, was going to press with its first edition when the power failed. Using facilities of The Record in Hackensack, N.J., the Times reduced the size of its paper and produced a four-page wrap-around carrying news of the initial hours of darkness.

The Daily News, the nation's largest-selling paper, used Newsday's facilities on Long Island to publish an edition of 50,000 instead of its usual 2 million. The new York Post did not publish today.

Emergency generators installed after the 1965 blackout worked at all hospitals except Bellevue in Manhattan, where doctors and nurse were able to use hand-powered respirators and got through the night without major crisis.

Major Beame announced one macabre power shift at midday. The auxilliary generator that had been used to keep the lights burning at City Hall would bransferred to the city morgue, where electricity was needed for health reasons, he announced.