When I first embark my ducks lay fertile eggs but not later
Solution 1:
As I understand it, at least in the latest version of DF, the male birds have to be able to reach the eggs in order to fertilize them, not the hens that lay them. It's counter-intuitive, since that's not how bird biology really works, but it is the behavior as of v.43.x. This is an "improvement" over earlier versions, where the males didn't even need to get anywhere near the hens or eggs (thanks @Iker) to fertilize them.
Make sure your male birds can reach the nest boxes -- put the boxes in the pasture with the other birds, for example. Your hens should wander over and lay eggs, then a tom/rooster/etc will follow behind and fertilize them.
Solution 2:
I found the following on the DF Wiki page on breeding:
There is a per-creature-type population cap, observed to be around 50, past which breeding animals will not get pregnant; existing pregnancies will mature to term. Furthermore, animals will not reproduce if children make up more than 75% of their population - for creatures which take longer than a year to grow up (such as elephants, which take 10 years), this can slow breeding significantly. Once the population drops below these caps, the creatures will begin breeding again.
This is the reason why my ducks are not laying fertile eggs; I already had a bunch of them from their reproduction during the beginning of my embark and due to the species cap they are now only laying infertile eggs. Knowing this, I now know that it is safe to butcher some of them and the remainder should then lay fertile eggs to replace their numbers.
Since this population cap is per species, during future embarks I will buy a breeding pair of every type of egg laying birds (turkeys, ducks, chickens, blue peafowl, guineafowl) to allow maximum egglaying population later on.