The energy source both in terms of fuel and electricity on my ship is nuclear fusion. Very precise nuclear fusion: there is no helium fusion until there is absolutely 100% helium in the main fusion tank and in the 6 other fusion tanks, so the ship only needs fuel once. Then they can fly through space via nuclear fusion forever.
Note that because of artificial gravity and cosmic ray protection, the people won't get space sickness or any other side effects of being in space.
Through the whole generation ship there is artificial sunlight. Some people are nocturnal. This requires invisible UV lights on the nocturnal side of the sleeping quarters so that every day crew members get vitamin D while they sleep. They will be burnt by UV, deal with it.
But the nocturnal side of the human (there are some aliens that are also nocturnal or diurnal although for different reasons) sleeping quarters requires absolutely no infrared or visible light, just UV.
The artificial sunlight on the ship covers this range:
Now how do they get this spectrum on a generation ship with green energy? LEDs, of course. They produce it at the exact type ratios shown here (7% ultraviolet, 44% visible light, 37% near infrared, 11% far infrared, the other 1% isn't important and would probably be just a bit more visible light in the case of the LEDs).
The visible spectrum is done using white LEDs(Pretty obvious).
With artificial sunlight, plants and animals can be taken care of, so they have chickens for eggs, cows for milk, etc.
But is this artificial sunlight the best way to mimic daytime in space? And for the nocturnal people, is UV during sleep the best way to get vitamin D?