Magic can be used for both good and evil purposes in The Tempest because magic is like any tool or weapon: it is essentially neutral. It's mainly a way of multiplying the power of those who use it.
You therefore have to look at how the magic is used, and who uses it, to see if it is used for good or evil.
For example, in Act I we see that magic can be used to imprison beings. To be specific, Sycorax trapped Ariel. That seems clearly dark or evil. By contrast, Prospero frees Ariel.
In Act V, in Prospero's long speech, we hear an account of all that Prospero did with his magic. If anyone who was evil opened graves and woke the dead, the results would be very dark indeed.
However, to really see how magic works for good, we need to look other places in the play. Prospero creates a storm in Act I…for justice. Prospero sends Ariel to confuse the shipwrecked…for justice, so he and Miranda can have their rightful places again. Then he sets the magic aside.