Car dies driving down the road on 2003 Hyundai Santa Fe

the card idled a little roughly, but then riding down the road it died, engine light came on, but, wouldn't start again. After sitting for an hour or so, car started and was able to get it home

Asked by for the 2003 Hyundai Santa Fe
If the check engine light is on, there is a code(s) stored in the engine control module. With a handheld scan tool you or a shop will have to read the codes and then perform the appropriate diagnosis to determine the cause of the problem.
If can you get the codes and post them here, we can possibly offer some more advice.