For getting EU in the Nether, the easiest way to get reliable power in the Nether is to place a BuildCraft Pump over a large lava sea, then connect Liquiducts or Waterproof Pipes, then craft & place a GregTech Thermal Generator where you want power Thermal Generators are just an upgraded Geothermal, basically; you get more EU per bucket of Lava with them and they are compatible with liquid pipes. They are also one of the easier GregTech recipes to craft - the hardest thing to obtain is Invar, which you can make by mixing Iron Dust & Nickel Dust (or Iron Dust & Ferrous Dust) or cooking Iron & Nickel/Ferrous Ingots in a GregTech Alloy Furnace.
Magmatic Engines from Thermal Expansion are a great source for MJ in the nether and can be hooked up in the same exact method as Thermal Generators. These also require Invar to craft, and the Invar you use to make a Thermal Generator can be used on the Magmatic Engine.
I've never used a terraformer in the nether and am unsure of whether it would work or not, but that doesn't mean you don't have options for making your own Nether Paradise or making a nice resort for the Zombie Pigmen. You can legitimately obtain still water blocks (placeable in the Nether), grass, and mycelium through by making UU-Matter from EU with a mass or matter fabricator (depending on which you have enabled in your configs.) If you happen to use bees, you can breed Nether Bees to have the Flower Pollination trait through regular means or splice the trait in with ExtraBees machinery. Place your flower-loving Nether Bees in an area with grass (plain dirt may be fine, as well) and just a single flower, and let your bees spread the flowery love around. If you want to chance them burning down by Ghast Whining, you could also place some saplings with torches next to them, add bonemeal, and then have trees. Once you have EU, make some waterfalls with the Still Water you get from UU-Matter, and your Nether Paradise is ready. Alternatively, use Mycelium and make the Nether into the Mushroom Kingdom (too bad the Ghasts are far less cute than Boos.) You could even use bees with the Mushroom Pollination trait to get large amounts of mushrooms to spawn on their own, though I'm unsure of which bees have that trait as I've never received it.
In the Twilight Forest, I'd have to say the way to get the absolute most power from a single power source is a GregTech Fusion reactor, but that's not really accessible to most people. I would say a regular fission-powered Nuclear Reactor would be the choice for the most power open to most people. Ultimate Hybrids can work in the Twilight Forest, though I've found they are a bit finicky about placement and the reason as to why they don't work isn't always readily apparent, but if you play around with placement, you can manage to maintain the low end of EU production easily.
Of course, if the amount of power isn't the biggest deal, you've got the whole array of options available to you outside of the lower-end solar panels. I had a giant fission reactor complex in my first Twilight Forest home, personally. If I make another Twilight home, I think I would try to go more with the nature theme. Working with the low light, I would make an underground mushroom farm, make it into Biomass with a Fermenter, and then use the Still to produce Biofuel, then use the Biofuel in a Diesel Generator, Bio Generator, or Steam Boiler. Of these 3, a Steam Boiler with the PowerConverters mod will produce the most EU. MineFactory Reloaded - awesome mod, can't recommend it enough - has a farm setup that will produce tons of mushrooms for you very quickly, as well. This setup could be easily used in the Nether, as well.
If you're making a home in the End, and don't care about flux or don't have Thaumcraft3 Installed, GregTech's Dragon Egg Siphon is your best bet for power production on a small scale - 128 EU/tick without ever needing to refuel it. Of course, if you do care about flux, then you have a problem.
If you have managed to save any of the Ender Dragon's Crystals, you can also use these as a free source of power with the Magic Energy Absorber in the End. You can even use them out of the End - you can also steal the Ender Dragon's crystals and spirit them out of The End with a Gravity Gun and a MystCraft portal. Just be forewarned, they do not like being moved, and they are a pain in the butt to place precisely.
Electrical Engines can be used to power a quarry easily. I made a plan for an easily portable & relatively cheap 1-block Nuclear Reactor that will never melt down if the plan is followed exactly that I use with Quarries. It produces 114 EU/tick. You can get the plan
here. Just my recommendation - produce power however you wish! Basically every single Twilight Forest quarry I've made has used Electrical Engines. They're great, especially upgraded.