The hat represents magickal gnosis. A wizard must be able to focus his will to a single tiny point, to be transmitted to the astral plane. The gnostic mind can also receive visions in the same way. The pointy hat is basically an antenna from the to the astral. Obviously you don't HAVE to wear a pointy hat to be a good wizard, but it's a convenient visual metaphor for what wizards are and what they do.
As for robes, it's because they convey a sense of sophistication and authority. Priests wear robes. Kings and queens wear robes during ceremonies. I realize this is somewhat circular logic, but it's the best answer I can come up with.