Greed is the downfall of many a man!
Play percentages and get the ball back into play. As YJ says punch works well provided you can clear the bunker wall. if you get the ball on the fairway 100 yards out you can still salvage par and avoid those nasty double bogeys.
As a rule more than 150 yards out I would not contemplate going for the green on most courses/bunkers. Also bear in mind the trajectory of your clubs will make the difference in clearing the bunker wall - so its is worth putting a game into practice mode and experimenting.