Indeed it's quite simple: E = m * g * h
E = energy (measured in joules)
m = mass (in kilograms)
h = height (in meters)
g = gravity acceleration (about 9.81 m/s^2 (at sealevel), often rounded to 10m/s^2).
So a weigth of 0,1kg (3.53oz) dropping down 1m (3.28') gives you 1 joule of energy, which is 1 watt/h for the duration of 1 second.
If you take a weight of 4 pounds (1,8kg) and raise it 1 meter 10 times and store the energy from dropping it down you now have 18J stored, with that you can let a 0,5W lightbulb shine for 36 seconds (E = 1,8 * 10 * 1 = 18J).
This formula is the same for hydroelectric plants, that is why the dam needs to be high and there has to be a lot of water. 1 megawatt = 100m3/s * 10m *g = 5m3/s * 200m *g.
