If we take a look at the Winning Percentage for each NHL team, and compare that with their Goals For/Game numbers, we find a relatively strong correlation, 0.626*, and if we exclude points earned by teams during shootouts (focusing only on regular play, which is when Goals For and Goals Against figures are determined), that correlation grows even stronger, coming in at 0.653. Clearly, teams that score tend to win.
What about defense, however? That's where the difference really appears. Taking each team's Goals Against/Game and running a correlation against their winning percentage, we come up with a very strong -0.825 (meaning that as GA goes down, Win % goes up). Make the same adjustment to remove points from shootout wins, and the value becomes modestly stronger at -0.832. Thus, while goal-scoring brings the fans out of their seats, it does appear that preventing goals has the larger influence on team success.
As a further validation of how well the overall Goals For/Against ratio relates to winning games, the correlation of Goal Ratio (GF/GA) with Winning Percentage came in at 0.929, and if you remove the points from shootout victories, it gets even stronger at 0.956! That's about as strong a correlation as you're going to find in this line of analysis, folks, and I believe it lends even more weight to the power of tools like PythagenPuck to get a picture of how teams will finish the season, based on GF/GA trends.
The lesson? If you can be above average at both offense and defense, obviously your team will be successful. Given the choice between one end of the rink and the other, however, it appears that the more predictable path to victory lies in building a strong defense.
*Recall that correlation values run from -1 to 1, with -1 meaning that two numbers are negatively correlated (when one goes high, the other goes low), +1 means they are positively correlated (when one goes up, so does the other), and 0 means there is no discernable relationship between the two.