Before his election to the State Senate, he served in the California State Assembly, representing the 57th Assembly district from 2006 until 2010. Hernandez was a member of the California Latino Legislative Caucus.
Hernández chaired the Senate Health Committee between 2011 and 2017.[1] He was the primary author for various laws affecting healthcare which were passed and codified in the California Health and Safety Code. An optometrist, he served as the Chair of the Senate Committee on Health.[2]
In 2012, Hernández authored and introduced Senate Constitutional Amendment No.5 (SCA5),[3] which would have asked voters to consider eliminating California Proposition 209's ban on the use of race, sex, color, ethnicity, or national origin in recruitment, admissions, and retention programs at California's public universities and colleges. It was passed in the California Senate on Jan. 30, 2014.[4] Opponents of Proposition 209 say that the proposition has resulted in low minority enrollment in the state's public colleges[5] and to have been driven by racial divisions.[6] However, following resistance from various citizen groups, including Asian American groups, Senator Hernandez withdrew his measure from consideration.
In 2016, Hernández announced that he would run to replace Gavin Newsom as lieutenant governor in 2018. Hernandez was term-limited from running in the State Senate in the 2018 Senate elections, as he was elected prior to the extension of term limits enacted in 2012.
In the general election, Hernández was defeated by Eleni Kounalakis, after he won 43.45% of the vote. He only carried five counties in the state: Glenn, Kings, Madera, Merced, and Imperial counties.