Corals expand primarily to feed. When you see them open during the day, essentially that is why they are open and that is what they are doing. The more inflated they are, the more access to light they have and the more light gets to their zooxanthellae, which is the primary food source for most corals. The opposite is true for most stony corals, that feed at night. When the lights go out, there is no need to stay expanded because there is no light to gain energy from.
Hope that makes sense.
Live in the Western MD/West Virginia/DC Metro Area?
Join our very active regional forum Here
Like the advice someone just gave you? Add to their reputation! Click on the balance icon underneath their username and let them know.