When you leave the room, please check whether you've turned off the lights.

Literal

Room [object-を] exit [when-とき] [topic-は], lights [object-を] turned-off [whether or not-かどうか] check [please-てください].

Uses ~かどうか to embed a yes/no question ('whether or not the lights are off') as the object of 確かめる (check/verify). A practical example of embedded questions.