A lot depends on your opponent. Finding the right moves in defence is generally much easier than finding the right moves in attack.
If you are playing a much stronger player your best chance will be if he attacks you and you can survive the attack. If he doesn't attack then part of the reason will be that he doesn't think he has built up the kind of position that warrants him launching an attack. If you try and attack in that situation then you will likely get beaten quickly. So, the best advice is to try and play openings and positions you are familiar with and concentrate on prophylaxis. Strengthen and reinforce your position. Make sure you don't have any weaknesses and always be alert to your opponents threats and the areas of the board he is building up in. Don't waste too much time looking for chances to attack him.
Conversely when you are playing a much weaker opponent your best chance will be to launch a sound attack. If both of you just try and defend there is a much greater chance of the game petering out in a long draw. But the emphasis really is on sound. Use your superior positional knowledge and experience to build up a better position with your pieces working together in the area of the board you want to launch your attack from. Don't launch it prematurely or your opponent may be able to defend correctly and successfully and either get the draw or even win on the counterattack!
If you and your opponent are evenly matched again strengthen your position first and build up before any attack. Be on the lookout for chances to attack more than you would against a much stronger player but make sure you do so from a position of strength.
In all 3 cases it is clear that early in the game you should be developing your pieces to good squares and strengthening your position. Sometimes these good squares will be in attacking positions because it makes developing other pieces easier for you and more difficult for your opponent. For example, pinning knights in openings like the Ruy Lopez. But the emphasis should be on building a sound position first and not trying to make a string of attacking moves before your position warrants it.