According to Google, the balloons were sent up as part of a scientific experiment. The Nexus S devices were used to capture data and Google specifically tested how the Nexus S's sensors (GPS, gyroscope, accelerometer, and magnetometer) performed. Of course, Google sent its lovable Android character along for the ride, and snapped pictures of it at 100,000 feet over the Earth's surface.
Google says that it tackled the project with a UCSC student, named Greg Klein, who helped to prepare the foam-cooler-housed payloads. Google explained, "We secured a nylon load line to the cooler and attached to it a radar reflector, a parachute, and finally, a weather balloon. Every payload had an APRS transmitter attached to a GPS that was known to work at high altitudes, as well as batteries for power. The remainder of each payload was different for each balloon: some had digital cameras taking pictures and some had video cameras mounted at various angles (up, down, and at the horizon)."
The payloads were sent skyward with a number of applications running. They were each running Google Maps for Mobile 5.0, which Google says let it know what was directly underneath the balloons as they soared toward the edge of the atmosphere. They were also running Google Sky Maps, which Google used to see if it could identify stars in the background. They were also running Google Latitude and some custom software to taking measurements as the balloons went up.
Google's Nexus S handsets provided some interesting data as they climbed high into the sky. The highest payload made it to 107,375 feet, the fastest traveled at 139mph, the highest GPS worked was 60,000 feet, and the devices survived -50C temperatures. On average, the balloons' flight time lasted 2 hours 40 minutes, with the descent taking up a mere 34 minutes.
Google reports that its Android handsets determined that the jet stream travels at 130mph at an altitude of 35,000 feet (right where many commercial airliners fly).
Here are some videos to give you an idea of how it all worked.