you get them as a timed goal for harvesting flowers, villagers will sometimes give you seeds randomly for favors, and you get 1 seed when you release a butterfly in someone else's garden.
I find that if you release one at a time (and then click finish in between) that you get more seeds than if you just released all at once.
I have a related question... once a dahlia has spawned a butterfly is that it? Will butterflies respawn on that same flower a little later? Or do you have to harvest it and plant a new one to get another butterfly?
Each flower only spawns one butterfly. Harvest and plant new. However, you should leave a few flowers all the time so your friends can share their butterflies with you. Note: butterflies can be shared on all flowers, not just the dahlias.