Hotels only for adults are in all California. Are they legal?

Can hotels legally prohibit children? Since spring holidays begin momentarily and summer holidays are not far away, the question is…