What should I do if I want to use magic with armor on?
Solution 1:
A lot of armor impedes spellcasting success rate. It is the EV penalty that determines the penalty. Higher strength (up to the minimum required for the armor I think, but not sure on this effect, or if high strength even matters) and higher armor skill helps. But even at high armor skill you will get a penalty for EV penalties higher than -2. See the wiki spell success page for more information.
There is one small thing you can do. Wear elven equipment, elven leather armor has no spellcasting penalties, or be an elf and wear elven equipment. Spellcasting elves wearing elven equipment get reduced penalties.
Other ways to improve spellcasting success rate, focussing on the specific skills of the spells, increasing spell casting (minor effect), wizardy items, intelligence, Vehumet worship (only for offensive spells), not wielding a weapon (not sure on this one), not casting blade hands etc.
You are never going to be a plate mail armored towershield wielding tank, throwing flamestorms all over the place. Crawl hates you that way. :D
Note on the crawl wiki, it can be outdated at times, and be critical of a lot of information that is on there. The mummy wizard guide for example, is great, for any non-mummy wizard ;). Checking the knowledge bot is better (also called learndb or henzel), however, a lot of the knowledge bot is about the trunk version, and not the latest release.
Solution 2:
Wear lighter armour: for example, a robe, leather armour or elven ring mail. Your character will immediately improve at both evading blows and at spellcasting.