Cut, don't pull. Pick those heads for pickling or for snipping up for use as an herb. Let them flower if you want dill seed. You can still use the flowered head for pickles.
Just as Lori says. When the plants begin to mature and yellow, you can process the seed heads: Cut the heads of the plants containing the seeds, leaving a short stem. Place them on a drying tray for five or six days, after which the seeds should fall fairly easily from the heads. Remove the chaff, and allow the seeds to continue to dry for another week, stirring them frequently. Store seeds in airtight jars after complete drying.