basically, when people say "play defensively" they are really saying "play smart." obviously, you need to attack to win, the thing is, that in brawl it is often much easier to counter attack your opponent when they miss an attack than to just flat out attack. this can be done through shield grabbing, dash grabbing, or just flat out hitting them when they miss a move.
think of smash as a game of trying to make your opponent look stupid by punishing his mistakes. here's an extreme example:
Player A is mindlessly offensive. he just attacks every chance he gets, plays no defense
Player B never initiates an attack, he always waits for Player A to try and attack before attacking back.
Let's say player A approaches player B with a dash attack. Player B can shield grab the dash attack, dodge the dash attack and then punish him, jump over the dash attack and land on him with an aerial, move out of the way of the dash attack and then punish him by dash grabbing or just hitting him.
So, as you can see, when you are playing defensively you give yourself lots of options to punish your opponent. In that example, player A had many choices to punish player B, all while player B was stuck doing his dash attack. Obviously, you need to find a middle ground between defense and offense that suits your play style, but the point of "play defensively" is basically to play off what your opponent is doing, rather than letting your opponent play off what you are doing.
Hope that made some sense?