How to add space between each last body paragraph and heading in Pages '09?
Based on your question and comments to @nathang answer, you will need to create two paragraph styles. One will be the standard paragraph, and the second is a duplicate of the standard but with a value set in "After Paragraph" in the Inspector to use for paragraphs that come right before a header. 

Using two paragraph styles is kludgy, but writing a script to automate this would be just as kludgy and unreliable.