The board of adjustment may reverse or affirm, wholly or partly, or may modify the order, requirement, decision, or determination appealed from and shall make such order, requirement, decision, or determination as in its opinion ought to be made in the premises and to that end has all the powers of the officer from whom the appeal is taken. Where there are practical difficulties or unnecessary hardships in the way of carrying out the strict letter of this title, the board of adjustment has the power, in passing upon appeals, to vary or modify the application of the regulations or provisions of this title relating to the use, construction, or alteration of buildings or structures, or the use of land, so that the spirit of this title is observed, public safety and welfare secured, and substantial justice done. Where feasible, the board of adjustment may vary or modify the application of the regulations for the purpose of considering access to sunlight for solar energy devices.