What is the energy source if a tall water tank is used to transfer floating objects upwards instead of cables with motors? Suppose I want to transport some logs from the ground to the roof of a tower. Originally I can use a lift, or some cables, or even move the logs upwards manually; then the energy is converted to the potential energy of logs.
Now, if I build a tall water tank from ground to the roof of the tower, and fill it with water, and suppose that I can push the logs from the bottom of the tank with a well shaped door, then let the logs float to the roof of the tower. What is the energy source that used to convert to the potential energy of logs?
 A: Just to expand on Hritik's great answer with a little more physical insight:
Energy as a "stuff", friction in this picture.
Very often we can define a scalar field (a smoothly-varying set of numbers, one for each point of the space) which describes everything about a pattern of forces. We call this the "potential energy" field. It is useful because a quantity called the total energy is conserved, this includes the kinetic and potential energies of all of the particles in a system.
Now we have to talk about friction: it is the big situation where energy is not conserved. But this is really easy to understand too, because friction leads to heat-energy, and heat-energy is known to just be kinetic-energy for things that we don't care about. 
Example visualization of the world in terms of energies
So if you think about dropping a bouncy ball from the top of a building, it's the same as if you have 2 cups of some liquid "stuff" (total energy) in some basin (energy of all the things you don't care about). Your cup labeled "kinetic energy of ball" has little holes drilled through the sides (air drag). Your potential energy cup is bigger, and is full. Nature pours energy from the potential into the kinetic cup at first, with droplets running out of the sides as the holes leak out some energy to air drag. Then the liquid level might come to some stable level (terminal velocity) where the liquid poured in is the same as the liquid going out through those holes. Finally the ball hits the ground, which basically shakes this kinetic energy cup, sending a spray of liquid into the basin, before Nature starts pouring the kinetic energy back into the potential energy cup. When it's empty (particle is at its maximum), Nature starts pouring the potential energy back in all over again.
The process continues until both cups are empty -- or, more precisely, when they have both come to the same level as the energy level in the basin (thermalization), which may not be 0. (Consider air molecules when they hit the ground: hopefully the Earth thermally-bounces them back with enough oomph to get up to the upper atmosphere, otherwise our whole atmosphere is about to collapse!)
Minimizing potential energy, flotation
Now we can use this as a general rule for where things eventually trend: a system eventually finds itself thermally jittering around a minimum of potential energy. If we neglect the thermal jitter for big systems, we have that Nature just in general directs things to minimize their potential energy. Call this the "minimum energy principle," the universe "wants" things to be at their lowest (potential) energy state, in the sense that energy will often gradually leak out into the surrounding world until this happens. 
(Notice that it also depends on the sort of friction: "static" friction overcomes this tendency for short timescales, which is why you can park a car on a hill. Basically, in this picture of the universe, static friction creates small potential energy wells whenever two surfaces of sliding solids are at rest relative to each other, as atoms between these two "bond".)
We can use this to figure out when something floats: just ask what the total energies are. Let's keep the object completely submerged so that we don't have to ask difficult questions about how the water level lowers as it comes out of the water and so forth.
You have an object, like a box of stuff, with some volume $V$ and density $\rho_o$ which can either be at the bottom of the liquid $(h=0)$ or the top of the liquid $(h=H)$, and the liquid has density $\rho_\ell.$ We know that there will be all sorts of complicated drag forces but the system will eventually minimize the total potential energy, and all of the other energy will be heat in the liquid and currents of liquid and the like. 
Now calculate the total potential energy when it is at the top: $\rho_o V g H.$ Easy peasy. (Add a constant term $L$ for the potential energy of all of the liquid.) Now what happens when it's at the bottom? 0? No.
Well, it's a little complicated: there is no place for the object at $h=0$ just yet, it's all full of liquid. When the object is down there, it displaces that same volume $V$ of liquid, moving it out of the space it occupies. That liquid ultimately displaces other liquid and so on until the "hole" at the top of the box is filled! We can actually abstract all of this away by imagining that we freeze time and just cut a box-sized hole of volume $V$ in the liquid at height $h=0$ and take that "box of liquid" and swap it with the object. The energy is therefore $\rho_\ell V g H$ as that box of liquid was moved to the top. Comparing this with the earlier expression we can see that $V$, $g$ and $H$ are the same. Our minimum-energy principle says therefore that things float when $\rho_o < \rho_\ell,$ and sink when $\rho_o > \rho_\ell.$
Furthermore, we discover that if something naturally has a density less than the liquid, so that it wants to float, a total energy $(\rho_\ell - \rho_o) V g h$ will be liberated by allowing it to float upwards be a height $h$.
(We can also now understand why logs prefer to float lengthwise -- water wants to be lower more than the log does so the log tries to concentrate its mass up at the surface of the water. And we can understand the more general case of stuff floating "out of" water: the only thing that the water notices is the "submerged volume" $V_s$ below the water line, which as far as the water is concerned bears the whole mass $m$ of the ship/log/whatever. So it has an effective density $\rho_e = m / V_s$ -- but since it's neither floating nor sinking, $\rho_e = \rho_\ell$ and we can therefore calculate $V_s = m / \rho_\ell$ to figure out how much volume gets submerged.)
How this applies to your case
When you shove the log into the water, you must therefore also displace the water, essentially pushing a "box" of water from the bottom to the top of the water column. This costs you an up-front energy $\rho_\ell~V~g~H$ just to shove the log into the water.
Now suppose that you tied the log to some very thin but strong fishing line, which goes out the bottom of the rig: it pulls a flywheel via some gearing mechanism. So every tiny bit of energy that this system gets by floating upwards is now going to be harvested into this flywheel. (Maybe we then want to use that energy to shove other logs into the water column?)
Well, we find that we spent an energy $\rho_\ell~V~g~H$ but in ideal circumstances we recover an energy $(\rho_\ell - \rho_o)~V~g~h,$ leaving us with the net deficit $-\rho_o~V~g~H$ which we have to supply from some external means. But... that's just the energy that you'd need to supply via any mechanism to lift that log.
A similar situation happens, for example, if you try to slurp up a volume $V$ of liquid at the bottom as the log goes in (zero cost to get in, yay!) and then let it float to the top. You get lifting for free, hooray! Except... now you've lost a volume $V$ from your reservoir, and if you ever want to put it back in, you're going to have to pay that cost to lift a volume $V$ of water back to height $H.$ You just used the water column itself as a "waterfall" of sorts to power the lifting of the log.
A: The work you need to do (to insert the log) against the pressure of the fluid at that depth is equal to the work done by the fluid to get the log up to the height you desire. 
If you consider a log of volume $V$ and a tank of depth $h$, the pressure at that depth would be $\rho gh$, where $\rho$ is the density of the fluid, and $g$ the acceleration due to gravity.
The work you need to do to insert the log into the fluid at that depth is $\rho ghV$. (the pressure times the volume)
The buoyant force on the log due to the fluid is $\rho Vg$, so the work done by the buoyant force to lift the log up by a height $h$ is $\rho Vgh$. (the force multiplied by the displacement, because the force is constant here.)
Both these quantities are equivalent, so the energy source here is you.
A: When you put the log inside (from the side) you need to place the water from the log position somewhere else. The relevant "somewhere" is at the surface of the tank, so you have to lift the water there (it takes a lot of energy to get a log-equal volume of water to the roof level). The surface is now higher than before (the log-equal volume divided by the area of your tank top).
When the log floats up, the water goes under it (a lot of friction is involved here, some energy get converted to warmer water, but you would probably not notice it).
When the log reaches the top (and everything is quiet some time after), the level of water surface will be a little higher than before you inserted the log, as the log still occupies some space in the tank (enough that a volume of water with weight equal to the weight of the log is displaced - ask Archimedes for more details).
Finally, when you remove the log on the roof, you return the surface level to its starting position (minus water spilled and soaked into the log).

Should you use some pipe for inserting the log and avoid lifting the water up, but just remove it from other side, the insertion could be easier, but afterwards there would be less water in the tank and lifting the water up to return it would you cost the energy which you borrowed to lift the log (with the "trick" with pipe).
A: There are two types of energy in this question: Gravitational potential energy, and whatever energy source you use to raise the water/lower the log.
When the log is at the bottom of the tank, the volume that the log occupies, its displacement, cannot be occupied by water. That same volume of water is being held up by the log. If that volume of water weighs more than the log, it creates an energy potential. Simply speaking, the entire column of water above it is being held up by the presence of the log. The gravitational potential energy stored in the water is what is being released when you release the log. Effectively, this is not so different from traditional hydroelectric storage. It's important to note that this is just energy storage! The energy to lift the water had to come from somewhere.
The other type of energy is whatever you used to lift the water above the log. Whether you force the log down with your arms (using sunlight stored as chemical energy in food), pump water in after the log is secured (electricity from fossil fuels, also sunlight stored as chemical energy), or let it fill with rainwater from a natural stream or river (lifted into the sky and filled with gravitational potential energy by the sun… seeing a pattern yet?), the energy had to come from somewhere!
As CR Drost also pointed out, whatever method you use will have energy losses, no perpetual energy system here!
Side point: In case you're wondering, there are common sources of energy that don't come from the sun.
Geothermal runs off of the heat from the Earth, some of which is leftover from it's creation(gravitational potential energy turned to heat by friction when the fragments smashed together) and the rest is from decaying uranium, plutonium etc.
Tidal power comes the the kinetic energy of the Earth — its motion. The Earth is slowly being robbed of momentum by the sea and moon.
A small (negligible?) amount of wind power comes from the coriolis effect — also the momentum of the Earth (the majority of wind energy comes from heating differences on the Earth's surface, caused by the sun).
