Rogues are plenty viable, depending on the kind of campaign and mode of play.
Like monks, rogues aren't the best at a lot of things. But not all campaigns are alike. My pirate campaign has a strong focus on skills and on-ship mobility, so our rogue and monk do very well. If you're playing a game which is in 4e tactical combat mode where it's basically one combat after another with slight bridging, you'll be less happy with the rogue.
A Rogue Isn't Just Sneak Attack
Mainly because Pathfinder isn't just combat. If your campaign has significant political or exploration elements, the skill focus of the rogue can be very strong. Sure, casters can nova some of those things better (find traps, invisibility, etc. ) but you can do them all day every day. Traditional old school style dungeon crawls are very conducive to the rogue.
If you take cues from the Paizo Adventure Paths, you'll notice that while there's combat there is often quite a bit of diplomacy and faction interaction, exploration, skill use, etc. Kingmaker for example is a campaign where you can kick all the butt you want but still fail in building a kingdom.
In real dungeons there's a lot of gimmicks. There's a hostage chained to the altar while people fight you. There's a big soul gem thing on a pedestal while the mage attacks you. There's an interplanar gate being opened while people fight you. Often, the fight isn't the goal - stopping the bad thing is the goal. In Pathfinder, the rogue can go stop the bad thing before the fight with the local goons is 1/4 over.
In our Carrion Crown campaign today, we talked our way out of a big werewolf fight. Because our characters aren't psychos whose goal is "harvest souls for the master," we have a goal that we sometimes have to fight people to achieve but we'd prefer not to. Rogues are good at social skills. (Sure, a bard is better - if you have one...)
A Rogue Is Clever
Your bestest skill is Use Magic Device. You're not a caster, but you can be! A lot of what you need to do is talk and sabotage and scout and go behind enemy lines. A lot of this is careful thought, but some is using all the tools available! Buy a wand of invisibility, stroll into flanking, and go to town.
Your fighting has a lot to do with sneak attacking, which in turn has a lot to do with flanking and/or making your opponent lose their DEX bonus. There's a lot of magic item abilities, spells, etc. out there that help you do that - see In what situations would a target be denied a Dex bonus to AC? Then, use things that will create one or more of these conditions. There's also a lot of movement abilities out there, from Step Up to the advancing weapon property to the entanglement of blades rogue talent (and plain old Acrobatics) that can get your rogue into flanking or other good situations the vast majority of the time. There's a billion combos, pick ones that suit you, your party, and the opponents. Obscuring Mist + Fogcutting goggles. Darkness + darkvision. Whatever. It's not as simple as "grease them!" any more but there's plenty of ways to impose those conditions. You are certainly gear dependent, but you can really shine if you look outside the box of "best weapon!" and get the weirder stuff that might normally be "for oracles" or "for cavaliers" but that if you UMD it, is perfect for you.
Also note that all the ninja talents are available as rogue talents - there's a lot there.
A Rogue Needs Cooperation
A rogue's a good solo character, but in a group the rest of the party can make or break the rogue. Your battlefield control casters and your other fighters can either be always looking for an opportunity to set up the flanks etc. or they can be always screwing it up. You need to help them into teamwork. You're a narrowly aimed cannon and if the group isn't playing as a team you can be ineffective. If they are playing as a team there should be little excuse to not be flanking etc. If the monk is stunning the guy next to you instead of the guy three squares away from you, for example, you are a lot more effective. Figure out what they can do and what you need to do. Dirty Tricks,
Being a combat monster isn't all there is to life, but even in combat the rogue can do pretty well for himself with smart play.