。
You shouldn't go to sleep with the lights left on.
Literal
Light [object-を] leave-on-[state-っぱなし] [object-を] do [unchanged-まま] [with-で] sleep prohibitive-[てはいけない].
Stacks several aspect markers: ~っぱなし (leaving something in a state), ~まま (unchanged state), ~てはいけない (prohibition). つけっぱなし = 'left turned on.' The whole construction is: 'do not sleep while leaving the light in the state-of-having-been-turned-on, unchanged.' Japanese has very precise vocabulary for 'states of having been done to and left that way.'