I like Pikmin 2 better. The limitation of Pikmin in caves made it so that there was an actual challenge to defeating everything in front of you. Unlike in Pikmin 3, where the worst thing that happens at a boss fight is that you have to go back the next day with more pikmin, the caves made it so you actually had a gameplay-based incentive to keep your soldiers alive as you went further down.
Also, the variety of enemies in Pikmin 2 added to that challenge. The game gave me a feeling when confronted with enemies of "Oh shit, how am I possibly going to take that down?" These encounters made it more tense for the feeling that I am threatened on an alien world. Compare this to the extremely lax 99 day fruit limit in Pikmin 3, and there's no real worry that you'll ever make it home and save the day.
I love Pikmin 3, and I agree that the winged pikmin and rock pikmin are much better than the purples and whites. But the game has no significant challenge that stems from the gameplay itself. There's hardly an obstacle that cannot be overcome by simply giving up a day and coming back with more pikmin.
You have to set your own limits on days or not wanting to massacre your troops, which feels more arbitrary to me. I don't want to be a murderous master, so I try to keep pikmin alive, but that's not intrinsically stemming from the mechanics itself.
Both are amazing games, but Pikmin 2 wins for my tastes.