When the Check Engine light turns on it is because the Engine Computer detected a problem, set a diagnostic fault code, and turned the light on to tell you. The light is required to turn on if the problem could have an adverse effect on emissions. It doesn't have anything to do with the oil level.
Many auto parts stores will read the code(s) for you for free. That is the starting point. Codes never say to replace parts. They only indicate the circuit or system that needs further diagnosis.