It ALL depends. It doesn't even matter, because sometimes, you could be in the shower or at the park or in the movies and some HOT lyrics come to you as you've heard them before and you remember them or write them to put them to a beat. Same thing for beats, you have a contagious melody that came from nowhere stuck in your head, then after you produce it, you write some lyrics to accomodate it. Plus, I don't think that everybody sticks to just writing lyrics to silence or to a beat, because like I said it all depends and special sparks of creativity do pop up out of nowhere for everyone.