The automation features in Apple Home can be set to do things at sunrise or sunset. These track down to the minute the sunrise/sunset times from the weather app data for your location.
Your best bet, if you really want an automatic chicken door, is to get a dumb one that just opens when powered on and closes (via springs) when powered off, then plug it into a smart outlet automated to turn on at sunrise and off at sunset.