Presumably the ghosts had some sort of presence during the day, even though they couldn't physically appear or attack people.
As I recall, when O'Donnell switches the base back to night mode on the Doctor's orders so that they can catch the ghosts, they reappear suddenly and in position. I can't find this scene on Youtube to check, but the transcript bears out my recollection:
DOCTOR: We know nothing. We don't know what they want. That's what's getting us killed. Well, I won't run. Not any more. So, O'Donnell, kindly put the base back into night mode. We want to know what these ghosts are after? We ask them. We're going to do the impossible. We're going to capture a ghost.
(The lights go down in sequence in the modular corridors, then the night lights come on. Pritchard is half inside a wall, the alien is standing sideways halfway up a wall and Moran is hanging down from the ceiling.)
COMPUTER: Good evening. Entering night mode.
-- Series 9 Episode 3, Under the Lake (emphasis mine)
Why did the ghosts appear suddenly in these awkward positions? If they actually materialised out of absolute nothingness when the base switched to night mode, it would make more sense for them to appear in, say, the places where they'd each died - or in the positions they'd been when the base last switched to day mode. But Pritchard was last seen in the middle of the mess hall brandishing a chair, not halfway through a wall, so neither of these possibilities can be true.
Presumably they appear in these positions because those are the positions they were already in. The evidence suggests that the ghosts have some sort of presence even during the day. They can't appear physically so that people can see them, nor can they attack or kill people, but they can move around. The next logical step is that perhaps they can have some sort of effect on their surroundings - for instance, changing the base from day mode into night mode so as to give themselves the ability to manifest visibly and attack/harvest more people.