Plants need magnesium ions, because magnesium is a key element in chlorophyll. You said you understood that magnesium is essential to human health but didn’t realize its role in plants, which is just as important. However, if we trace the history, the first time magnesium was discovered in living tissue was in a study of chlorophyll. That is to say, we came to understand the importance of magnesium in the growth of plants earlier than we even knew that there is magnesium in human bodies.
Because magnesium is crucial for making chlorophyll, to understand why do plants need magnesium ions for healthy growth is to understand the importance of chlorophyll. Plants are defined by chlorophyll: the primary role of plants in the cycle of life on Earth is to exploit the sunlight energy for transforming carbon dioxide and water to glucose and oxygen. This process is better known as photosynthesis, and it cannot be done without chlorophyll.
The contribution of chlorophyll in photosynthesis is two-fold: first, the majority of chlorophyll in a plant absorbs the energy from light and transfers it to the other portion of chlorophyll in the so-called reaction center; second, the reaction center chlorophyll uses the received energy to oxidize water into oxygen and hydrogen ions. This is, incidentally, where practically all the oxygen in the atmosphere comes from. And magnesium is important in chlorophyll, because it forms the central atom of it and has a pivotal role to play in both the transferring and oxidization processes.
If a plant is deficient in magnesium, it would be quite easy to discern. This is because chlorophyll is a kind of pigment that renders plant leaves green. If a plant doesn’t have sufficient magnesium, the chlorophyll in it will tend to degrade gradually, and the leaves of the plant will turn yellow. Two of the most common causes of magnesium deficiency in plants include excess potassium and aluminum toxicity.