Yes and no
If by "mast light", you mean the white light on the front of the mast that shines forward, it is called a "steaming" light, and is required to be used at night on a sailboat when under power. You are not legally required to use a spreader (also known as deck) light, although they are a good safety item when you have to work teh foredck after dark.