The laws are a response to a groundswell of concerns from privacy advocates complaining that companies and schools were demanding that employees, students or prospective employees and students must provide their usernames and passwords to social networks like Facebook, Twitter, and email accounts.
One bill was targeted squarely at employers, some of whom were disciplining employees who would not provide their personal information for social media. For the past couple of years, employers across the US were demanding job applicants and employees provide such log-in credentials as part of a review for hiring or retaining employees. There has been sufficient public backlash at such practices that many companies have abandoned the policies, but now that it has happened, it gave legislators cause to write a law prohibiting such behavior.
The second bill was pointed at colleges and universities, some of which had been demanding user names, passwords and other information from students and student groups. Several schools were snooping into student social media accounts, targeting high-profile students in particular, like athletes.
California is known for taking the lead nationally with regards to new eras of legislation, both good and bad. As California goes, so does much of the rest of the US, so other states may draft their own companion legislation modeled off these two laws.
The new laws go into effect on January 1, 2013.