Clearly, the wings have nothing to do with aerodynamics, as there is nothing aerodynamic about 99% of the vessels in the Star Wars universe, and almost everything short of the Death Star makes controlled landfall and takeoff. (Seriously, how does the Millennium Falcon do it? It's a stunted frisbee! Eh, a question for another day...) As to the suggestion that the so-called "S-foils" are used to generate deflector shields, that doesn't explain how the other fighters in the Rebel fleet create defensive energy screens (well, maybe the B-Wing). It just doesn't add up.
Now, I grant you, looking for science in Star Wars is a largely a futile gesture (Parsecs are a unit of distance, not time!), but we can have fun trying, anyway. The Sci-Fi Apologist has an amusing wing-theory: The x-wings are really heat sinks for the high-powered laser cannons.
Cute, but I think we can do better. So, here's your assignment, boys and girls: What's the REAL reason X-Wing starfighters have wings? Let the theorizing begin!