Green beat Willy Gueret with a low right-footed shot just four minutes after Craig Mackail-Smith had cancelled out Ali Gerba's opener.
In a disappointing first half, Peterborough's Shaun Batt came closest to breaking the deadlock when he hit the post from 12 yards.
The home side took the lead after 63 minutes as Gerba marked his home debut with a goal. The Canadian was played in by fellow substitute Sam Baldock before unleashing a deflected shot past Peterborough goalkeeper Joe Lewis.
United levelled seven minutes later when referee Phil Dowd awarded a controversial penalty after Miguel Llera handled in the box while Gueret was lying injured.
Mackail-Smith fired the penalty into the bottom left corner, before Green struck to give Peterborough all three points.