The CEL and the level of fluids don't have a relationship. That's why you probably have separate lights for things like oil and temp.
The ECU monitors sensors related to vehicle emissions and adjusts certain settings to maximize performance and fuel economy accordingly.
Yes, a loose fuel cap, as strange as it sounds can cause problems and should be checked.................but nothing is ever that simple.....at least with my luck... ;-)
The first, most suspect culprit that triggers a CEL is the O2 sensor located in the exhaust line. If it's old, then it may be due for a change.
From there, you'll need to get the codes pulled for a more detailed read on the situation.
Let us know how it goes.
BTW - What type/year/engine vehicle?
Cheers,