Light tricks Rem into killing L. Light makes Rem think she has no other choice but to kill L in order to save Misa's life. This happens when L tries to test the death note to see how exactly the death note works, and then Rem kills L before he can test it.
DANG REM!!!!!!! You know, as much as I like Misa, I think it would have been better for Rem to kill HER instead!! That would have saved EVERYONE SOOO much more trouble!!!! I mean, it would be all unexpected and tragic and stuff, but at least L and Watari would be alive!!