The craft eventually drifted down to the base's main landing strip, touching down at a speed of roughly 400kph.
"Now we can declare this mission a total success," Ed Weiler, Nasa's head of space science, told a news conference.
The Atlantis astronauts were the fifth and final crew to work on the Hubble telescope, which was launched in 1990.
An initial servicing mission in 1993 fixed a problem with the telescope's prime mirror, giving Hubble an unprecedented view of the universe.
Its observations have provided evidence of galaxies that formed far sooner than scientists thought possible and of the existence of super-massive black holes at the centres of most.
Hubble has also shed light on a mysterious anti-gravity force known as dark energy that is driving space apart at an increasingly faster rate and it identified chemical components of the atmosphere of a planet beyond the solar system.
Dave Leckrone, a Hubble senior scientist, said: "There is no area of modern astronomical research that hasn't been profoundly affected and changed by Hubble."
'Brand new Hubble'
In teams of two, Atlantis' four spacewalkers tackled a long list of repairs and upgrades to keep Hubble at the edge of research for the next five-to-10 years.
"It's a brand new Hubble once again," Weiler said.
|Two days of bad weather in Florida prevented Atlantis from landing at Cape Canaveral [AFP]
Astronauts overcame a wide array of obstacles, including stripped bolts, stuck screws and tiny fasteners that were never intended to be removed in space.
They also installed a new camera and light-splitting spectrograph, replaced positioning gyroscopes and batteries and attached new protective panels over three of the telescope's instrument bays.
The first images from the refurbished observatory are due in September.
Nasa officials said the next shuttle mission would be ready for launch on June 13 as planned.
The space agency has eight more shuttle missions remaining before it retires from the fleet at the end of next year.