Short answer: Yes, but not for long.
While Gov. Jerry Brown did sign a law in September legalizing the strangely popular trend of posting ballot photos to social media, that law won't go into effect until Jan. 1, 2017. That means for this election it's still illegal to take and post a photo of your marked ballot.
According to an Associated Press survey, there are 18 states where so-called ballot selfies are illegal. (The AP put California in the "where legal status is unclear" category.) Some of these states take the illegality of such photos more seriously than others. Denver District Attorney Mitch Morrissey even issued a reminder to voters last week that posting such a photo would constitute a misdemeanor.
The warning said: "There is a state law prohibiting voters from showing their completed ballot to others. This would include posting your completed ballot on social media."
ACLU advocates noted, however, this warning implies that disabled voters who require assistance in filling out their ballots would be guilty of a misdemeanor -- which is not the case. It's also true that courts in Indiana and New Hampshire have overturned similar laws as a free speech issue. So expect the national fight over the ballot selfie to continue.