Functional molecules and their assemblies have attracted considerable attention arising from not only diverse structures with novel properties but also potential applications in molecular devices. The novel properties, which determine their applications, are strongly related to their structures. In recent years, benefiting from the development of atomically precise control technique of the structures, a lot of new materials constructing from molecules with novel properties emerged. Their novel properties enable them to be potentially applied in molecular spintronics, high-density data storage, selective reaction and quantum topological devices, and so on. The present review focuses on new progress in predicting and controlling the structures and properties of functional molecules and their assemblies on metal surfaces by combining first-principle calculations with scanning tunneling microscopy experiments. We aim at understanding the key factors which affect the physical and chemical properties of the metal-organic systems, especially from a theoretical perspective.