If all our actions are determined by prior causes, that doesn't seem to leave much scope for punishment. Gregg Caruso discusses this issue with David Edmonds in this episode of the Philosophy Bites podcast
Listen to Gregg Caruso on Freewill and Punishment