As MC84 said, it's largely dependent on the situation. Commentators mention all the time about the decision made from a penalty in regards to the situation, but it's largely due to a feel of the game. A captain can judge the flow of the game and weight that up against the score and time and come up with a decision that is ultimately correct...but in saying that, it can be a coaching thing as well. Some coaches like their squad to take any points on offer, others will leave it to the captain to decide.
If you're ahead by 20 points, as you mentioned, then the penalty decision would depend on your opinion of the other side. Probably a better example would be 24 points...say there were 30 minutes left...does it feel to you that they could score 4 converted tries to level the scores? If you see a threat, take the 2. Every added try they have to score to win the game is a psychological blow.
A minor decision such as this can turn a game completely on it's head.