So if you have those three important things, sunlight, rock, and water, you have the basics of a coral reef, and conditions for life.
1. You have a strong foundation for growth. Rocks are solid and allow a strong surface for coral to grow on, so they don't get blown away by waves caused by the suns energy.
2. You have energy and heat, from the sun. Without energy nothing can live. The sun provides all the energy on Earth. And the heat to give the sea a warm temperature.
3. You have a medium in which to live, called water. The medium is not so dense like rock that nothing could really move if it was surrounded by it, (imagine living in a box made of rock,) but lighter and easier to move through.
The three are your basic three components of a coral reef, and without them it wont exist.
One could say air would be a fourth component, and it is very important too.
But from just rock, water and sun, the atmosphere of Earth was made by living things evolving and adapting over millions, perhaps trillions of years, that created an atmosphere called air.
So when evaluating your reef aquarium for problems, you can resort back to the basic 3, or rather 4 components of a coral reef.
Is it my rock?
Is it my water?
Is it my light?
Is it the air?
Now if you dont start with good water/salt you wont have a successful reef. Or if yoh top up evaporated water with tap water. Same with rock it needs to be impurity free, or at least mostly. Copper in your rock would be leathal to coral. Same with the air in your reef, needs to be clean, unaltered air. You dont want your skimmer pumping in hydrogen sulphide gas. And your light, if its too close to your reef, it can burn coral. These are just some examples.
The next part will get into the life that creates its system and how they help one another.