C.S. Lewis writes that Uncle Andrew was "vain as a peacock" and that was why he had become a magician. What connection can you make between vanity and wanting to be a magician?
The first connection that comes to mind between vanity and being a magician is power. Someone who believes they are better than everyone else is also likely to believe they should be able to have access to more power as a reflection of their greatness. In the book, for example, Uncle Andrew is able to use his powers to access the other world, which he expects will give him considerably more knowledge and influence (both forms of power) than if he were not a magician. Of course in the book we see that instead of giving him power, it brings Jadis into his life, who enslaves him in spite of his magical abilities.
The second connection I see between vanity and becoming a magician is control. Again, individuals who exhibit vanity would not want things to be outside of their control because it might affect their power or station. Uncle Andrew views learning magic as an additional tool to provide him with a greater ability to control what is happening to him.