A app for this seems utterly useless.
You're asking for an app to be made? Where's the market for such a inane app? To me the button is far more useful than unlocking the screen and putting the phone on silent using an app that takes memory and processor resources, even if only temporary.
Next.
Um Jessica, that was sort of rude. There are a lot of people who need that kind of app--myself included, that's why I'm here.
Up until 2 days ago my mute switch was working fine--now it doesn't work. The switch is still intact and there's no damage to it or anything, but it just doesn't activate the silent mode any longer (I wish I knew a fancier way of saying that, but I'm not a techie).
You need a jailbroken phone for this, so I searched in Cydia and found SilentMode Switcher. You have to pay for this one-$1, but I think it's well worth the price of repairing the button that will most likely be over $1. Plus, no worries about the switch being toggled on in your pockets if it still works for you.
This app is a GENIUS idea, and I can only wonder how the designers at Apple didn't foresee this kind of issue--if there's an external switch, it's almost a fundamental rule of nature that it can/will be broken. There should ALWAYS be 2 ways to do something. Apple should have included an internal way of silencing the phone because as of right now there ISN'T (at least not on my 3GS). You can turn the text messages, emails, Facebook or whatever to no alert, but you'd have to change those settings individually, and do it each time you wanted your phone to be on silent. Plus, there's still no way to completely shut off the ringer, you can just lower it till it's very very faint. Not good if you're a student like me taking an exam or in a job interview! That's the advantage to an internal silent mode.