At one level both are rather irritating questions! Obviously I need the lantern because I'm going somewhere that needs a light! Further, if I've got a power outage then my house is dark and, if he's lending me his lantern, his house isn't, so it's pretty clear why I need the lantern!
At another level, both are just small talk, an invitation to elaborate perhaps to given an idea of when the lantern might be returned.
Well, I'm off to my cabin in the woods for 2 weeks ...
or
Just need to be able to see the circuit breakers down in my cellar, should have the lights back on pretty quickly.
We could interpret the questions literally: what do you need it for? That's asking the specific use. Most likely just an interested question, but could yield to a further discussion if there are special considerations in using that kind of lantern.
"Why do you need a lantern" may be enquiring about the circumstances leading to the need of the lantern. Could lead to discussions about preparedness for power cuts or the need for better maintenance.
The tone of voice might lead us to know how literally to take these questions. Without further indication I'd be seeing the general meaning to be identical, just small talk about the situation.