In the following dissertation two different molecular systems on a metallic surface that show a double-well potential are investigated by methods of scanning tunneling microscopy (STM), atomic force microscopy (AFM) and X-ray absorption (XA). The investigation is motivated by the fact that double-well potentials are essential for the realization of digital bits in computational technology. In both molecular systems the question of control or addressing the state by electric current is explored. The first investigated molecular system is the charge transfer complex tetrathiafulvalene( TTF)/tetracyanoethylene(TCNE) on the (111)-surface of gold. By means of atomically resolved AFM two distinct conformational states of the TCNE were identified. While one state shows a pronounced Kondo effect, the effect is not present in the second state. This is explained by a change of parameters of the Anderson impurity model due to a change of the hybridization with the surface. The conformational states of the TCNE in the charge transfer complex lie in the two minima of an asymmetric double-well potential that is investigated by measuring of switching rates with STM. When switching into the thermally stable state, a probably thermal relaxation process is present that is absent in the other switching direction. The difference in the switching dynamics allows a controlled switching in the desired state. The second investigated molecular system is dysprosium-tris(1,1,1-trifluoro-4-(2-thienyl)- 2,4-butanedionate) (Dy(tta)3). The intact and monolayer-wise adsorption of the complex on the surface are verified by STM. Combined XA and STM studies prove a coordination geometry with two tta-ligands adsorbed flat on the surface and one tta-ligand standing upright. A uniaxial magnetic anisotropy, the potential barrier, in the central dysprosium ion is detected by X-ray Magnetic Circular Dichroism. The anisotropy is induced by the negative charges of two flat-lying ligands. An interaction of the magnetic moment with tunneling electrons is ruled out.