The Democratic Party yesterday decided to return to New York City, where Jimmy Carter was nominated for president three years ago, for its 1980 national convetion.

New York, pledging more hotel rooms than any of its rivals, was the overwhelming choice of the party's site selection committee, winning 23 first-ballot votes. Detroit was a distant second, with three votes. Philadelphia got two.

The vote came after token debate. Memories of 1976, when New York polished up its tarnished Big Apple image for the Democrats, were a key factor. The committee's only real concern in making the selection appeared to be how to say no politely to Detroit Mayor Coleman Young, a staunch ally of President Carter.

A jubilant Mayor Ed Koch told reporters that New York won the convention because, "We not only want to renominate the president, we want to have a good time doing it. After you've seen New York, can you really go to Detroit or Philadelphia?"

The mayor had a little fun at the expense of defeated rivals."It's not Coleman Young's fault that delegates would have to put in hotels in Canada, but who wants to go to Canada to nominate a U.S. president?" he said. "If it were in Philadelphia, delegates would get lost in Atlantic City and lose all their money gambling."

"Obviously, I think this committee has made a mistake. I think it's time the Democratic convention gets back to where the people are," Young said. "I don't believe in crying over spilled milk. But they could have done better."

Joseph LaSala, Philadelphia commerce director, was even blunter. "To use an old Philadelphia expression," he said, "We was robbed."

Detroit, an overwhelmingly Democratic city, has already been chosen as the host of the Republicans' 1980 convention, beginning July 14, 1980. The Democratic convention is to begin Aug. 11, 1980.

Democractic National Chairman John C. White informed Koch of the committee vote by telephone. "I think the theme song for the convention should be "Jimmy Comes Marching Home Again, Hurrah, Hurrah," he said.

Originally, the Carter White House had favored a southern city as a convention site. But when Atlanta and other major southern cities were ruled out because their states had not passed the Equal Rights Amendment, the White House didn't push for any particular city, leaving the choice up to the selection committee.

The final decision appeared to center chiefly on facilities, with New York offering a better convention hall and more hotel rooms than the other finalists. The convention is expected to attract more than 5,000 delegates, thousands of guests and 1,600 reporters, photographers, technicians and broadcaster.

To accomodate them, Detroit proposed using rooms in Windsor, Canada, and as far away as Ann Arbor. Philadelphia proposed using college dormitory rooms and hotel space as far away as Atlantic City.

Each had an additional drawback. In Detroit, the Democrats worried that they wouldn't have enough time to set up after the Republican convention. In Philadelphia, the ceiling on the Civic Center was only 28 feet high.

The ceiling, site selection chairman Don Fowler of South Carolina said, "would make the convention look squashed on television."

The convention is expected to cost New York about $7.4 million, including rent and alterations at Madison Square Garden, where Democrats had trouble fitting all of the delegates on the convention floor in 1976. CAPTION: Picture 1, Members of the Democratic National Committee notify New York Mayor Ed Koch that his city was selected for the 1980 national convention. From left are Pat Cunningham, N.Y. state Democratic Chairman Dominic Baranello, John C. White, national Democratic chairman, and Don Fowler, site chairman. AP; Picture 2, New York's Madison Square Garden, main arena for the 1980 Democratic convention.