@Tang Ho's answer is absolutely correct, except it is formal and written styles of Mandarin, and would sound anything from stilted to incomprehensible when spoken. He also takes things a bit too literally, as sentences he criticizes actually mean what you want, even though I wouldn't say that is a bad thing to do.
While your sentence is not the way I would naturally put it, people would definitely understand what you mean. Yes, technically the sentence strictly means "whenever the Sun is visibly in the sky" and happens to most often refer to when the Sun re-emerges after e.g. rain, but people get what you mean because this literal interpretation is too twisted and unlikely. It is like how technically "the Sun is out" means "it is a clear day with few clouds" but people know you mean "when there is daylight".
So for example,
白天不能进食
Yes it technically means "daytime". But it would be a bit silly to suggest that it does not include dawn and twilight, especially in practical senses. If someone said to me that they can't do something in 白天, for example
我白天不能喝柠檬水
I can't drink lemonade in 白天
and it is 6am when the day has dawned, or 7:20pm when it is still twilight, I would not be surprised at all that they would not like to have lemonade now. I would only be sure I could offer them lemonade and not be refused when it is completely the night.
The colloquial way to put what @Tang Ho has is:
太阳仍在天空时不能進食
→ 太阳还在天上的时候不能吃东西
→ 太阳还在天上的时候不能进食
The 进食 part is fine, and you don't have to change that necessarily. 吃东西 "eat stuff" is just the colloquial way to put it. If you want to mean that you also can't drink stuff, just add (也)不能喝水 or 或(者)喝水 or 和喝水 [^1]. Technically 喝水 means drink water, but it is also a set phrase where 水 generally refers to consumable liquid. If someone tries to get around this by deliberately interpreting this literally, just respond to them by 什么都不能喝 "can't drink anything".
The phrase 仍在天空时 is really a bit stilted in colloquial Mandarin, especially if you explain it in a casual setting, or sandwich this in a colloquial speech.
You do not actually need 还 "still", but you also make complete sense including it.
For any sentence with 前 that he has, those are fine, even though not entirely colloquial, like 进食. The way to be more colloquial is to replace it with 之前 or 以前.
从日出到日落不進食、 (不喝)水,不吸烟
→ 从日出到日落不吃东西、 不喝水、不吸烟
or 从日出到日落不能吃东西、 喝水、吸烟
Again, 进食 is fine. It's not listed just for brevity.
However, there can't really be parentheses there in colloquial Mandarin, because you risk not being able to be understood. 进食 is a set phrase in Mandarin, and there is no set phrase as *进水 meaning "to have water". 进 itself does not mean consume [^2], which makes guessing the meaning a lot harder. People might be able to piece together what you mean still, especially if they know you are not a native speaker and hence would devote more attention to actively figuring out what you say, but you absolutely cannot just expect that to happen.
[^1] Could you just say 吃 and 喝 like English can say "eat" and "drink" without objects? Yes, and you won't get misunderstood. Some people might interpret that as you are slightly suffering in some way, but that is all.
[^2] "进" means "consume" only in a few set combinations related to eating, like
进食 "eat";
油盐不进 "lit. not taking in oil or salt; meaning being stubborn and (in addition) refusing to listen or consider it / things";
滴水不进 "lit. not taking in (even) a drop of water; meaning not consuming / to consume / able to consume anything";
滴水未进: 未 means "have not" or "did not" instead of 不 "not".
粒米不进: 粒米 "lit. a grain of rice" instead of 滴水 "lit. a drop of water". This may or may not suggest "not drinking anything".
A rule of thumb deciding on what speech level or register to use: the more highly educated the other party, and the more familiar the other party is with written, formal styles of Mandarin, the more likely it is you will be understood saying something in the written or formal register. And it's not that a lot of people can't understand, for example, 仍在天空时, it is just that they will need time parsing them because that is not the expected syntax or words in colloquial Mandarin, and at least I think both of you would appreciate a conversation with less hurdles.
But if someone looks like they may not be familiar with the written styles of Mandarin, e.g. if they have not received a lot of education, then try to stay clear of written or formal styles and try to speak as much in spoken / colloquial styles as possible. So, for example, do so when speaking to an illiterate person. This is not discrimination, but really just to facilitate understanding, because otherwise you literally do not get understood, and probably neither of you wants that. After all, you can't make the unreasonable assumption that everyone knows written styles of Mandarin well, which is usually not the way people speak.