When the Service Engine Soon light comes on, but you experience no drivability issues (stalling, skipping, surging, etc) than most likely the fault is in the EVAP (emissions) system. Unfortunately, there are literally dozens of parts/sensors in this system. The fuel cap is just one of many that is monitored. You best, XXXXX XXXXX at this point is to have the current codes read from the computer. To avoid the cost of diagnostic fees, you can go to any local AutoZone location, and they'll do it for Free. Once you have these "p-codes" you can more efficiently diagnose the problem.
When you had it smogged, was the light on?
Whoa. Really? I'm an inspector here in Rhode Island, and on our machine, if that light is on for ANY reason, its a Fail. Guarenteed. If that light was on during an inspection test, then I would strongly suggest it's a "minor" sensor in the EVAP system. Without any drivabilty issues, its definitely in the EVAP system. For now, it's ok to ignore, but like i say, if you'd like to have it checked for Free, AutoZone is the place to go. Once you get the "p-code" you can bring it here to us, and we can give you the possible causes. But if it passed an inspection test, and you see no issues, i wouldn't sweat it.