A disappointed Challenger crew ended an otherwise flawless flight by landing in the California desert this morning after rain and persistent low clouds scrubbed plans for the first space shuttle landing at the Kennedy Space Center here.

Seconds after touchdown, they were greeted with a poker-faced announcement from astronaut Bryan O'Connor in Mission Control:

"The good news is that the beer is very, very cold. The bad news this morning is that it's 3,000 miles away."

Though their families, friends and colleagues were all back in Florida hoping to welcome them, astronaut Sally K. Ride and her four crew mates stepped out of the spaceliner with lively strides and walked around the shuttle to inspect it.

Smiling widely, astronaut Norman E. Thagard gave America's first spacewoman a quick slap on the derriere and then rubbed his hand along her back. Astronaut John M. Fabian gave her a big hug.

In a congratulatory telephone call to the astronauts, President Reagan referred to Ride's skill at manipulating a 50-foot mechanical arm to deposit and retrieve a satellite, and said:

"You were there because you were the best person for the job. That sets a standard that's going to be followed for men and women in the astronaut force from now on."

Ride in turn thanked astronaut Robert L. Crippen "for being the world's best commander," and said the flight was "the most fun I'll ever have in my life."

For a while this morning it looked as if Crippen and his crew would make it back to Kennedy. But about 4 a.m., rain-filled clouds descended as low as 400 feet above the airfield, cutting visibility and producing a steady downpour that could have severely damaged the thousands of tiles that cover the shuttle's fuselage and protect it from the heat of reentry in the upper atmosphere.

Once just before sunrise and once just after sunrise, Crippen, Fabian, Ride, Thagard and Frederick H. Hauck were "waved off." After the second time, they were told to bring their 100-ton spaceliner to Edwards Air Force Base in California's Mojave Desert.

Three hours late and completely across the country from the planned landing site, the astronauts brought Challenger down out of clear blue skies at 9:56 a.m. EDT to a perfect landing in the middle of one of the dry lake beds that serve as runways at Edwards.

Later, as technicians towed the shuttle to a work area, one wheel sank into a muddy spot caused by recent rain. Five hours later, the workers had managed to remove the wheel, cover the muddy spot with plywood, replace the wheel and resume towing.

Though disappointed by the failure to land in Florida, space agency officials said the California landing in no way could be called a program setback. Its only impact, they said, would be an eight-day delay of the next shuttle flight, originally scheduled for Aug. 16, and possibly a postponement of the following flight.

Any time it lands in California, the shuttle must be flown piggyback to Florida on a modified Boeing 747, adding eight days to the "turnaround time" each of the spaceliners needs to be readied for a new launch.

At a post-landing news conference here, Air Force Lt. Gen. James A. Abrahamson, associate administrator of NASA, said:

"If this weren't our first landing at Kennedy, we would have been bolder, but obviously we're not there yet. We have to improve our ability to launch and land in adverse weather conditions."

The earliest the space shuttle can now land at Kennedy is next February, on the 11th scheduled flight. The eighth shuttle flight, planned for August, will include both the first night launch and the first night landing. It is to end at Edwards, where there is more runway room to allow for landing mistakes.

The ninth flight, a nine-day mission set for September, will carry the $1 billion Spacelab, built by the European Space Agency. The 16-ton experimental laboratory's size also requires a return to Edwards to give the shuttle crew the runway room they need to land with that much weight still aboard.

The 10th scheduled flight is a secret Air Force mission that has been delayed indefinitely and may be postponed until after the 11th flight in February. It is being held up by an investigation into why an Air Force engine misfired on the sixth shuttle flight in April and forced a $100 million communications satellite into an errant orbit.