I first heard of this word when my former boss told me this line “Aha! You are moonlighting!”. I was clueless then what does that mean. I wanted to tell him, “what do you want me to do?” but the clarification came first of its meaning: “sideline aka work outside formal work (employment)”. Of course I was relieved when he said that it was OK (well not that he explicitly mentioned it though I never got any reprimand nor suspension out of that. :P). Well of course, as courtesy, you should inform your boss if you have any other work aside from your work just to put things properly and to prevent any conflict of interest that may arise.
Some time after, I encountered the word in an unexpected scenario: in the registration part of Visual Web Developer Express. On the bottom part of the registration, you can see the following:
Of course, you saw my answer (:P). Good thing the Microsoft guys know that some developers are really moonlighting. 😛