Well, technically both rybot & Dragunov are right. Locking S-foils in attack position (for both X- & B-wings) provide not only better maneuvering, but also increase the firing arc for the cannons. It doesn't increase top speed (like the gameplay mechanic in the Rogue Squadron games suggest), save for atmospheric flight where having them closed decreases wind resistance and makes them more aerodynamic. However, their combat performance in atmospheric conditions are more than suitable to say the least.
lol The atmospheric to space combat performance ratio varies from craft to craft.
The only way maximum speed could be increased is if the pilot manually reroutes power from other sub-systems to the engines (the complete opposite of what Dutch, Tiree & Pops did at the Battle of Yavin; big mistake). I don't recall if this ability is limited only to craft designed to carry astro droids, though. Hmmm...
It has been suggested that engaging deflector shield systems creates an invisible aero-dynamic form for craft performing in atmospheric conditions, but I haven't seen anything that indicates this statement is canon.
Personally, I'd much rather have manual control over the S-foils. I don't like it when they open and close based on my acceleration.
ME LIKE FULL CONTROL! 
Artificial intelligence is no match for natural stupidity.