Use a comma when the phrase is a verbal phrase (Running away), a non-essential appositive, or an absolute phrase (The audience waiting). Also use a comma when a pause is necessary or the lack of a comma will cause confusion.
Prior to the scandal the governor’s approval rating was high.
Prior to the scandal, the governor’s approval rating was high.
At the end of the day money is just money.
At the end of the day, money is just money.
A writer may use discretion to determine whether a comma is needed. Here is an example which
creates a subtle difference.
Of course I am happy.
Of course, I am happy.