California has been administered under Spanish, Mexican, and U.S. law. Divorce is presently legal, which it assuredly was not in the Spanish Empire. At which point in history did the process of divorce, civil or religious, become legal and viable in California?
The earliest I find,according to Digest of the laws of California: containing all laws of a general character which will be in force on the first day of January, 1858 ... prepared under an act of the Legislature of California of the session of 1857 by William H. R. Wood published S. D. Valentine and son, 1857
Act of March 25 1851 concerning Divorces Art 2632 Sec 1
The several district courts of this state within their respective districts shall have exclusive jurisdiction to grant a divorce from bed and board and from the bonds of matrimony
So it appears the State of California had divorce laws on the books almost from the beginning(California/Statehood granted September 9, 1850).
Note concerning Alta California: You mentioned that divorce was assuredly not legal in the Spanish empire, but there appears to have been a process by which it could be achieved. Stories concerning Governor Fages and his wife Dona Eulalia(from A History of California: The Spanish Period By Charles Edward Chapman)
...Dona Eulalia became suspicious and at length convinced though without justifiable grounds that Fages was paying altogether too much attention to a servant girl whom he had picked up among the Indians of the Colorado. Thereupon she broke silence with Fages and accused him of infidelity in a torrent of words Moreover she rushed into the street and told everybody vowing that she would get a divorce The friars tried to reconcile her and said that they found no grounds for a divorce.
So there was a process available in Alta California under Spanish rule. A second reference, California Under Spain and Mexico, 1535-1847: A Contribution Toward the History of the Pacific Coast of the United States, Based on Original Sources (chiefly Manuscript) in the Spanish and Mexican Archives and Other Repositories By Irving Berdine Richman , pg 157 elaborates some on this process:
Eulalia began divorce proceedings in April 1785 before the Acting Comandante General Jose Antonio Rengel at Chihuahua but Asesor Solicitor General Galindo Navarro decided that the case being one of divorce its proper forum was the ecclesiastical court of the Bishop of Sonora.
So it appears that divorces in Spanish California, at least of individuals of this standing, were required to be processed by the ecclesiastical courts. (No divorce was actually performed here, as the couple reconciled later).
If you are referring to no-fault divorce, it became legal in 1969 under United States law.
Divorce was acknowledged as legally possible in section 12 of "An Act Defining the Rights of Husband & Wife", enacted before statehood, April 17, 1850.
At least one divorce happened that same year; Sacramento Transcript, Volume 2, Number 29, 27 November 1850:
Divorces in California.— If there is any one spot on earth where less of this kind of thing should take place than another, that place is California. Females have heretofore been so scarce that we should think wives would be more highly esteemed by their husbands, and more closely endeared, so as to render an application for a divorce a novel affair. We observe that in San Francisco, on Saturday, the Superior Court granted a divorce to Mary Dyson from her husband, James Dyson, for various causes. George R. Parburt, Esq., for Plaintiff.