Yes it is legal to peacefully secede.
The constitution says nothing about secession. However, it does say that all legal decisions are determined by the Supreme Court.
The Supreme Court only looked at the topic of secession one time;
"“In 1869, following the Civil War, the U.S. Supreme Court ruled in Texas v. White that the initial act admitting a state to the Union “was final.” “There was no place for reconsideration, or revocation,” the court said, “except through revolution, or through consent of the states.””
Three separate California Attorneys General have supported this conclusion: Kathleen Kenealy on January 10 2017, Xavier Becerra on July 10 2017, and Kamala Harris on August 28 2015. (see section on past initiatives).
“In theory, because it was a majority vote of Congress to admit California, in theory a majority vote of Congress could approve secession.”
Chemerinsky is the top constitutional scholar in California and disagrees with other lawyers who say that secession must equal an amendment. If he is right, then California only needs to get 25 states to "vote us off the island" - in order to fully legally and peacefully secede.