Both
Dendrophyllia sp. and
Tubastrea sp. are from the same family,
Dendrophylliidae. They exhibit very similar behaviors, including feeding and staying open during the day once "trained."
Corals from this family are nocturnal feeders
in nature, as
wicked demon pointed out, due to the fact that the water in nature becomes rich with plankton and food for the coral at night. During the day, there is little to nothing for them to eat, so they'll generally retract thier polyps.
In captivity we can provide food sources whenever we want to... if you only feed
Dendrophylliidae during the day, they'll eventually "learn" to stay open during the day, yet instinctually (if you can even call it that) they are nocturnal feeders so it can take some time, coaxing and effort to keep these guys open all day long.
One of the biggest misconceptions I read/hear consistantly these days is that
Dendrohyllia sp. stay open during the day and
Tubastrea sp. (Sun Coral) do not... this is simply not true. Many times
Tubastrea specimens are in very rough shape when they come in, they're brought in in huge quantities, they'll sit at a LFS longer than
Dendrophyllia sp. will, thus leading them to be in worse shape by the time we get our hands on them. At this point they require lots and lots of food, and generally need to be "container fed" (see more on this here:
http://www.reefcentral.com/forums/showthread.php?s=&threadid=1528186&perpage=&pagenumber=2)