It's hard for baseball trades to be "everybody wins!" scenarios, but it does happen sometimes. Whether it be a team overpaying out of desperation, or a team underselling out of sadder desperation, you usually can pinpoint a winner and a loser. I can't say I see a loser in a trade of Hunter Pence to Philadelphia for Jarred Cosart and Jonathan Singleton.
In Philly they had a major need for another bat and one that could seriously spell old man Raul Ibanez and young man Domonic Brown. The Phillies now have their future set with Pence, Brown, and Shane Victorino, as Pence is signed through 2013. What they didn't have as much of a need for is starting pitching and a first baseman. For better or worse, the Ryan Howard contract extension hasn't even kicked in yet, if you can believe it or not.
Pence is having his best overall year since his rookie season, hitting .309/.356/.472 with 11 HR, 62 RBI, 49 R, 7 SB and 26 doubles. Hitting in Philadelphia with Howard, Chase Utley, Jimmy Rollins, and Victorino compared to Carlos Lee and Brett Wallace... well, to call it an "upgrade" would be selling it quite short. Runs and RBI's could increase significantly and Pence could be a top outfield option for the next several years.
In Houston, they've cut payroll significantly which should help them breathe a little easier in the free agent market this season, which means they'll sign a mediocre relief pitcher for four times his market value. The good news is that Singleton came into the year as Baseball America's #39 prospect, but has had a bit of a power outage. He's hitting .282/.386/.411 with 9 HR in 92 games. However he is still only 19 years old and helps rebuild a terrible farm system.
Cosart is 21 and playing in high-A (same as Singleton) with a 3.92 ERA, 79:43 K:BB ratio in 108 innings and 98 hits allowed. It's been a step backwards this year for Cosart in terms of numbers, but he's got time to turn it around and he'll be on the fast track in Houston, compared to the logjam in Philly.
I'd expect both players to contribute in Houston as early as next year, if Jose Altuve and Jordan Lyles are any indication of the current patience level for the Astros right now.