Like most issues in aquaria, water quality is vital to success and should be the first thing to investigate if any of the animals in your aquarium seem unhappy. Once the basics such as nitrates, SG and temperature are ruled out, it's time to look a little deeper.
Corals are basically made of seawater - they construct their tissues from elements dissolved in it and if any of these are missing or inadequate, normal function is impossible. Check levels of calcium, magnesium and factors such as alkalinity to make sure they're within normal bounds.
Lighting is crucial for most photosynthetic corals and often a change in lighting regime can take some adjustment. With the rise in cultured and fragged corals, it's easier than ever to know what levels your animals are used to, and approximating these can ease the transition for new animals. Water movement can be an important factor too - some large-polyped species prefer moderate currents that don't damage their expanded tissues. Such corals will often remain closed to prevent the risk of injury.
Aside from the environmental factors, compatibility can be an issue for animals that have evolved to fight for space and resources. Sited too close to one another, some corals can deploy sweeper tentacles armed with stinging cells whilst others use toxins to ward off rivals. Fish can occasionally be a nuisance for some corals, with a few species being prone to nibbling certain corals - sadly this can vary between individuals, and even within a species, a few can be rather unpredictable, especially in the case of Dwarf angels and Tangs. Shrimps can also cause a coral to withdraw when they move over the surface of the animal and a few species can also predate coral polyps.