Lux is a great counter to malzahar. I main Malzahar, and my biggest challenges are smart lux players, any for kassadin and LeBlanc.
The key to beating malzy is realizing where his strength is, he's a close range caster. The only way he can get you long range is if you stand near his malefic Visions and it procs onto you from on of your minions.
Lux has a decent range, longer than malzahar. Keep him at bay with your little exploding circle, and if he moves in close punish him for it by stunning him and giving him a good burst.
DON'T stick around after that though unless you're going to kill him, because if you stay close enough for him to use his spells on you, then you'll take a beating.
anyways, I hope that helps!