You don't name the vehicle or give many particulars, but most of these 'check engine' light situations are caused by malfunctions in the emissions systems, that can be caused for a myriad of reasons. Given that there are probably two coolant temperature sensors on or near to the thermostat housing, which might have been unplugged to necessitate the changing of the thermostat and which directly or indirectly control some of the other emissions systems/components, first thing I'd be looking for would be one or both of the coolant temp sensors not being plugged back together in the wiring harness at the plug, or a bad connection at those points. That's the easiest and quickest thing to look for and check.
If that's not the problem, then pull the codes off the computer and that'll steer you in the right direction, at least.
Incidentally, IF you find the problem in the wiring/plugs to the sensors as I mentioned above, your 'check engine' light might not extinguish until the engine comes up to operating temperature and the vehicle is driven at least 30-35 MPH for a short distance. Good Luck!