I would go further than posipiet: find a good bike shop and do what they say. They know exactly what bikes are available and how those bikes work in your local area.
I suggest thinking very carefully about suspension. On a bike that cheap you will not get good suspension, so the question is whether you would rather have poor suspension or better parts. The money that goes into the suspension comes from the rest of the bike - everything else is a little bit cheaper.
Buying second hand is definitely a good way to save money. There's more risk of getting a bad bike, and you need to be careful about bikes that are cheaper than they should be - they're probably stolen. The difference between a bargain and a thief can be hard to tell. Checking the frame number with the Police is about all you can really do.
What type of bike do you want? The choice is between a mountain bike and a hybrid, I think, although you could get a cheap racing bike for $500. But if you ride offroad at all the racing bike will not work, so Iĺl ignore that.
The hybrid bike will have thinner tyres, a more upright seating position and be slightly lighter. You will go slightly faster on it, but off road it will not work as well.
The MTB will be lower, longer and have fatter tyres. It will be less comfortable but perform better off road.
Like suspension, disk brakes look cool and all the expensive bikes have them. But again, cheap disk brakes cost more than cheap V brakes so that extra money means everything else is a little bit cheaper. They will probably work better than V brakes, but cost more to service. But they might not need servicing as often.
Also consider spending some money on accessories. At least lights and a rear rack, possibly mudguards as well. Buying panniers is probably out of your budget, but those will make commuting a lot easier. The idea is to get your load off your back and onto the bike.