If you get electricity from the sun (or the wind, which is essentially sun power), then you are heating the earth no more than it would be heated by the sunlight anyway. You're just intercepting the sunlight power and using it to do something useful, instead of letting it heat up the ground, or letting the wind heat up the air through friction. Similarly with hydroelectric power.
That doesn't apply to fossil fuels or nuclear power, though.
But really, the biggest factor by far is how easy it is for long-wave radiation to escape the earth. One thing that isn't intuitive is that every particle of heat radiation that escapes the earth is likely to have "tried" lots of times before, but been reflected back by greenhouse gases (or has bounced around in the atmosphere a lot, being absorbed and re-emitted by CO2 or methane or H20). Basically, only a tiny fraction of the heat radiated from earth actually makes it to space instead of being reflected back. So changing that balance is really what causes the climate to warm, not generating more heat on earth.