Can aurora or the Earth's magnetic field be harnessed to make energy?

Yes, but it takes a lot of wire! The magnetic field of the earth, at a given
geographic location, doesn't change very much, and only changes in a magnetic
field can be used to drive electrical currents in a wire. Typical changes in
the Earth's field are measured in fractions of percent and are caused by solar
and other geomagnetic disturbances out in space. 'magnetic storms' can cause
up to a 1 percent change lasting several hours, and in northern countries
these also coincide in the evenings with auroral displays. This means that any
'auroral electricity' you generate will be very unreliable and certainly not
in constant supply, but come and go with the time of year, solar activity
cycle, and other factors that make them unpredictable.