My Treo had this option, and so did the Hero that I had for a few weeks. When a call is coming in, there is an option on the screen to ignore the call and reply with a text message. I realize this can be done just by pressing the "hangup" button and then unlocking the phone, and then opening the SMS app, finding the person's contact info, and replying, but a one-button process would be really nifty.
If there is not such an app, where's a good place to start learning how to write one?
If there is not such an app, where's a good place to start learning how to write one?