The play shows that magic can be a source of both good and evil but poses dangers such that it most often shouldn't be meddled with. This is most dramatically illustrated with the love potions administered in the forest to Lysander and Demetrius.
Puck is directed to put the love potion in Demetrius's eyes so that when he wakes up, he will fall in love with Helena. This is Oberon's attempt to do a good deed. However, it does turn out to be dangerous when Puck makes a mistake and puts the potion in Lysander's eyes—and then to rectify the problem, puts the potion in Demetrius's eyes as well. Though meant to do good, having both men fall in love with the same woman leads to fighting and could easily have had a tragic outcome. Nevertheless, in the end, when the situation is sorted out, the magic has the good effect of bringing Helena and Demetrius together.
Likewise, using magic to have Titania fall in love with Bottom has a good outcome: it resolves the quarrel over the Indian boy, as Titania is so distracted by love that she loses the will to fight. This solves the problem of storms and other "discord" in nature that is ruining crops for the humans. On the other hand, we have to question using manipulation as a power play. It was wrong of Oberon to manipulate Titania into breaking her promise to the Indian boy's mother that she would care for her son.
In the end, magic is presented as a mixed bag that poses dangers and should be used seldom and with great care.