Discovery of only handful of exoplanets required to establish a correlation between giant planet occurrence and metallicity of their host stars. More than 20 years have already passed from that discovery, however, many questions are still under lively debate: What is the origin of that relation? what is the exact functional form of the giant planet -metallicity relation (in the metal-poor regime)?, does such a relation exist for terrestrial planets? All these question are very important for our understanding of the formation and evolution of (exo)planets of different types around different types of stars and are subject of the present manuscript. Besides making a comprehensive literature review about the role of metallicity on the formation of exoplanets, I also revisited most of the planet -metallicity related correlations reported in the literature using a large and homogeneous data provided by the SWEET-Cat catalog. This study lead to several new results and conclusions, two of which I believe deserve to be highlighted in the abstract: i) The hosts of sub-Jupiter mass planets (∼0.6 -0.9 M ) are systematically less metallic than the hosts of Jupiter-mass planets. This result might be related to the longer disk lifetime and higher amount of planet building materials available at high metallicities, which allow a formation of more massive Jupiter-like planets. ii) Contrary to the previous claims, our data and results do not support the existence of a breakpoint planetary mass at 4 M above and below which planet formation channels are different. However, the results also suggest that planets of the same (high) mass can be formed through different channels depending on the (disk) stellar mass i.e. environmental conditions.