Get the appsFirst of all - you have to buy and install Tasker and Pebble Tasker on your phone.
Tasker is a script engine. It makes it possible for you to add new functions to your phone, almost only with your imagination as the limit. It's ultimately possible to export tasker scripts as an application so you can "program" an application you can share.
To use the scripts you make in Tasker, you have to use Pebble Tasker. This gives you direct access to up to 25 script using the 3 buttons on the right. And you can use Tasker to change the Pebble button functions on-the-fly, making the number of tasks much higher.
Be aware that Tasker will run 24/7 in the background so you should expect your battery time to decrease. It is possible to disable Tasker if you prefer longer battery time from time to time. Actually you can make a Tasker script, that disables Tasker.
Also notice that Tasker WILL slow your phone a bit. Actually I had to uninstall it on my Galaxy Nexus 3 because of that - but it runs fine on e.g. an old HTC One X.
Setting up Tasker
To read more about Tasker: See tasker.wikidot.com
And now for some simple scripts:
Read out the last text message
When driving a car or walking the dog - it's not always possible to pick up the phone and read the text message that just arrived. So lets start with a simple script that will read out the last text message received when you press a button on Pebble.