There are mixed opinions on this.
Some people adamantly insist that the ranged ranger is better because he needs only dex and wis, while the melee ranger needs str, dex, and wis.
Other people adamantly insist that the melee ranger is better, because he can use Proficiency: Bastard Swords, Weapon Focus: Heavy Blades, and Two Weapon Fighting until he's attacking with a proficiency 3, 1d10 weapon, with +2 to damage on his main hand and +1 on his off hand, at heroic tier. And then he can get Two Weapon Defense, for extra protection.
My take on it is that they're pretty balanced. The ranged ranger is a bit more efficient in terms of ability scores and feats, and can project damage really, really well. The melee ranger is a bit stat spread (though he can remedy that with Armor Proficiency: Chain, costs him 1 feat and 1 point of movement in exchange for the ability to dump dex, everyone forget this for some reason), but has good feat choices and acts as a secondary Defender for the party. That can't be underestimated. Having a Ranger around loosens up a lot of the pressure on the Fighter by giving him a partner who can benefit from the Fighter's marking powers, and who occasionally absorbs damage, spreading it out amongst the party.