Service engine soon light

Could the malfunction of the thermostat cause the service engine light to come on?

Yes - but there’s no need to guess. Go to a chain auto parts store such as Autozone and ask them to pull the codes. Write down the exact codes (P-numbers in the form Pxxxx) and post them.

I went to auto zone. Here is the code P0128. i HOPE YOU CAN HELP.

Yes. If the ECU thinks the engine is still cool it’ll keep the mix too rich.
And yes, P0128 is the code for your temp sensor.

The temp sensor output can be tested.

Have a look at this: http://www.obd-codes.com/p0128

Checking much of this isn’t beyond the reach of someone with some basic knowledge - especially if armed with a repair manual for the car.