To be appropriate or correct behavior, as in a social situation. Comme il faut is French for "as is proper." It is not comme il faut to overshadow the bride at a wedding.
behaviour that is comme il faut is correct because it follows the formal rules of social behaviour It's not exactly comme il faut to be seen making jokes at a funeral.