It is perfectly legal, and it would be legal to not hire someone who lacks a vehicle if there is any reasonable connection between having a vehicle and doing the job. So if employees may sometimes have to run errands, make deliveries, go to other locations, or pick up things, or if the business is located in a location not well-served by public transportation, so realistically, someone would need to have a vehicle to reliably get to work on time, this question is appropriate.