Catan: Play any development card before rolling
You can play a development card at anytime on your turn.

From the Catan Rules p. 7:


  You can play the [development] card at any time, even before you roll the dice. You may not, however, play a card that you bought during the same turn. 


However if you have Year of Plenty there is no reason to play it before the roll because you can just play it after the roll and get the ore you need in order to win (and still have a card left over), and if you were not in a position to win playing it before the roll would mean you have one fewer cards than playing it afterwards.