The paper is devoted to finding conditions to the existence of a self-indexing energy function for Morse-Smale diffeomorphisms on a 3-manifold. These conditions involve how the stable and unstable manifolds of saddle points are embedded in the ambient manifold. We also show that the existence of a self-indexing energy function is equivalent to the existence of a Heegaard splitting of a special type with respect to the considered diffeomorphism.