When Gandalf comes back alive after dying in The Lord of the Rings, why does he come back as the white wizard not the grey wizard? Am I correct that it is because Saruman had become evil?
Tolkien addresses this in Letter 156:
[Gandalf] was the only person who could direct the resistance to Sauron successfully, and all his mission was vain.
The 'wizards', as such, had failed; or if you like: the crisis had become too grave and needed an enhancement of power. [...] [Gandalf] was sent by a mere prudent plan of the angelic Valar or governors; but Authority had taken up this plan and enlarged it, at the moment of its failure.
The Letters of J.R.R. Tolkien 156: To Robert Murray, SJ (draft). November 1954
Gandalf's promotion was a decision made by God to offset the growing power of Sauron and the waning power of the Free Peoples of Middle-earth.
Gandalf came back as the white wizard because the current white wizard (Saruman) had turned his back on what the Istari were meant to be doing in Middle-earth and had joined Sauron in his goal of domination of Middle-earth.
Because Saruman had abandoned his purpose Eru appointed Gandalf to be the next white wizard. This allowed Gandalf to shatter Sarumans' staff and take the mantle of white wizard instead of grey. Becoming the white wizard meant that Gandalf was the head of the Istari sent to Middle-earth.