Can a red dwarf star or a white dwarf have enough energy to support life on earth? How it will change the climate and the seasons of earth if it is our only star? (energy source)(Expecting it to change since earths orbital mechanics will also change)
Certainly a red-dwarf star can have enough energy for a planet around it to be in the goldilocks zone. There are some difficulties with red-dwarf stars and Earth like planets. The planet would need to be very close to the star and as a result, tidally locked. The orbital period would be quite short, so there would be no seasons and one side of the planet would be in permanent sun the other side in permanent shade.
Red-Dwarf stars, unlike our sun, grow colder with time and they can be quite magnetically active, sometimes called flare stars, though not all red-dwarf stars are flare stars, many start out that way. The proximity to that much solar-ejection could strip planets of their atmosphere early in the planet's life.
None of that makes it impossible. It's certainly possible for a Red-dwarf star to host an Earth-like planet, but there's some difficulty. Orange or Yellow stars are, on average, considered better candidates.
A white dwarf, however, likely not possible. A white dwarf follows the red-giant stage of a star. It would be too small and give off too little energy and any planets that survived the red-giant phase would likely be very distant. Life and/or an Earth-like planet around a white dwarf is virtually impossible.
Not life as it has evolved on Earth, no. A Red Dwarf emits mostly in in the infrared so the rate of photosynthesis would be very slow, leading to the collapse of food chains even if the temperature was favourable. An old white dwarf that had cooled to Sun-like temperature might be able to support life on Earth for a period of time, but given how close the orbit would be I suspect the Earth would become tidally locked to the star, so that the same face always faced it. Eventually you'd have baking hot temperatures on the day-side and a frigid wasteland on the night-side, with possibly a small habitable twilight zone.
It is possible that the red dwarfs can support life, but we would need a strong magnetic field and a path that would take us closer and closer because that dwarf will cool overtime. A white dwarf would not be possible because they are the remnants of dead stars, so Earth would not have survived the blast (the other planets wouldn't have either).