Yes, it is legal to save seeds that are wild, open pollinated or heirloom varieties. The only seeds that are illegal to save are ones that are owned by a large corporation. This usually only applies to farmers that buy GMO seeds. They are not allowed to save those seeds, but instead must buy new seeds each year from the corporation. Seed saving in factory farming is actively discouraged.