The abundance and diversity of minerals is controlled directly by their chemistry, in turn dependent on elemental abundances in the Earth.
The majority of minerals observed are derived from the Earth's crust. Eight elements account for most of the key components of minerals, due to their abundance in the crust. These eight elements, summing to over 98% of the crust by weight, are, in order of decreasing abundance: oxygen, silicon, aluminium, iron, magnesium, calcium, sodium and potassium.
Oxygen and silicon are by far the two most important — oxygen composes 46.6% of the crust by weight, and silicon accounts for 27.7%.