What California Statute states illegal for high school teacher having sex with 18 year old student?
I'm not aware that this would be a crime, but it would probably be found out, and it might possibly result in the teacher's losing his or her job, and possibly his or her teaching credential.
It's a crime for an adult to have sex with someone *under* the age of 18, but generally not with someone who has already reached that age. The state could make it a crime for a high school teacher to have sex with even an adult student in his school, but I don't believe that it has.
Of course, that something isn't a crime does not mean it's a good idea. As Mr. Stone notes, a variety of unpleasant consequences could result.