I believe this is the Cycle of Fire trilogy by Janny Wurts. Goodreads has this summary:
A collection of the three volumes of a classic fantasy trilogy finds three young people struggling to free the Stormwarden, the last of the elemental power-wielding Vaere sorcerers, so that he can battle the humanity-threatening demonkind.
One of the reviews has this in it:
The magic in this book is reliant on a type of living crystal which exists symbiotically, imbuing its wielders with power while depending on them to propagate itself (this is not a spoiler). Goodies and baddies alike use the crystal and herein lies a part of the central conflict.
This answer to another question has more details on the spaceship, etc.
The Goodreads summaries for the individual books:
Stormwarden
The first novel in the The Circle of Fire trilogy. As a new plot threatens mankind's survival, three children stand at the crux. All possess extraordinary talents, but each of them is flawed. In need of all their help is the Stormwarden, last Vaere-trained sorcerer, condemned now and trapped in a desperate quandry.
Keeper of the Keys
With Kiethland restored to precarious peace, Taen Dreamweaver and Jaric, the sole heir to Ivain Firelord, have thwarted the demons' initial bid to exterminate humanity. But the threat remains in the precarious charge of the Stormfalcon's feather and the Keys to Elrinfaer that imprison the ravenous Mharg. Both must be restored to Anskiere, still trapped in his prison of ice. His release will depend upon Jaric's mastery of the Cycle of Fire, the sorcerous challenge that drove his father to madness.
Both Taen and Jaric must prevail against Taen's brother, Emien, fallen to demons and overridden by alien desires that ravage his spirit. With Emien the perfect pawn shaped for Kiethland's downfall, his overlords feed his insatiable hatred with power for one purpose only: to hunt down and slay the Firelord's heir and the sister whose gentler talent defends him.
Shadowfane
Jaric, the Firelord's heir, has narrowly survived repeated attacks by the demons--psionically endowed beings--and evaded their attempts to enslave him. Now, on the Isle of Vaere, he trains for his final ordeal: mastery of the Cycle of Fire challenge that broke his father's sanity.
In the dark court of Scait, Demon Lord of Shadowfane, a vicious adversary arises to a tainted destiny. Emien retains the shape of a man, but his warped snarl of hatred and passion are controlled by a ruthless master. He is recruited to seek out human children who possess latent talent for sorcery and suborn them to further Scait's conquest, . With Jaric's fate uncertain, Emien's own sister, Taen Dreamweaver, must stand on her own to defend humanity, unaware that the victims she spares are the innocent bait to lure her into the malignant thrall of Shadowfane's overlords.