Location and timing. I got an offer at my job in the area I went to college before I graduated. They even waited till I finished school before they made me work.
After location, salary is the most important. In this industry you'll usually get paid pretty good, but you can get ripped off if you don't know what you're doing. I thought I was getting paid a lot, but I later found out I'm getting paid about $9000 below the market value per year for an entry-level software developer. I'm not going to leave my job, since the experience is invaluable and it's my first job, but watch out for that.
I guess after that, the work has to be interesting. If you can't wake up and at least kinda look forward to work, you probably need to look elsewhere. In my case I write software to support a fighter jet, so no problems there.
Some people have their priorities in a different order, but this is what works for me.