This question already has an answer here:
How many suns are around Starkiller base in the Force Awakens? Is it just one? If its sucks the power out of one star from the back of the planet how is the front of the planet lit up like the sun is shinning on it when the Rebels attack it? If the weapon is charged shouldn't the plant be in the dark?