expression
not in keeping with the occasion; inappropriate for the setting
Used to criticize behavior or remarks that ignore the atmosphere or formality of a place or situation. Often appears in formal or written contexts.
葬儀で笑うなんて、場所柄弁えずにもほどがある。
Laughing at a funeral is the height of not being in keeping with the occasion.
彼の冗談は場所柄弁えずで、会議の空気を悪くした。
His joke was inappropriate for the setting and ruined the atmosphere of the meeting.
場違い means 'out of place' or 'inappropriate for the occasion' and is more common in everyday speech. 場所柄弁えず is a longer, more formal expression with a stronger nuance of failing to consider the nature of the place.
空気を読む means 'to read the room' and is a positive action. 場所柄弁えず describes the negative result of not reading the room.
Compound of 場所柄 (nature of the place) + 弁えず (negative continuative of 弁える, 'to discern'). The phrase literally means 'without discerning the nature of the place'.