So, now that you know the basics of what defenses and offenses do, you probably want a straight answer; which is better?
It depends on the stage of the game. Offense tends to master the early game, for reasons that have already been outlined. Small ships are just better off with offensive weapons. You need some offense in order to take down an enemy after all, and at the early and mid game it is very important to take down enemies as quickly as possible, so that they don't take down your ship's hitpoints in prolonged combat.
As the game progresses, defenses begin to break even. They start to become superior at the point that you have access to Large size hulls. The small size of defenses, combined with the gobs of space available on Large size hulls, creates the possibility of making a nearly invincible galactic fortress, capable of repelling all attackers. I have frequently used high-defense dreadnoughts to tank numerous enemy battleships. These fights will be long, because the flip side of making a high-defense dreadnought is that your offense will be no more dangerous than a kitten's. However, if your enemy's offense has no chance to penetrate your defense, then it does not matter how long the fight lasts, nor how many ships attack you. Your victory is assured.
So there you have it. Offense early, defense late. Not everyone agrees to this assessment, but you could do far worse than follow this rule. At the least, you can rest assured that the AI will not be able to counter your high-defense late-game dreadnoughts, making the galaxy yours to conquer as you see fit.