No. Not all organisms. Because in a way fish are organisms and there are some that live way down in the deep dark water. And they cannot swim up to where the sun is or they would disintegrate. So the answer would be no, not all organisms depend on the sun for energy. Different organisms have different ways of getting energy.