Yes, they may do this. Employers, including both temp agencies and their clients (the businesses they place workers at) may set the requirements for employment, so long as they do not discriminate on the basis of some specifically protected category or classification (e.g. under federal law, it's illegal to discriminate in employment on the basis of  race, religion, sex, age over 40, or disability). Therefore, the tem agency or client could make having a driver's license a requirement or condition of employment and refuse to hire someone lacking one, even if that person is not actively driving for the company. (Perhaps they want the flexibility of having you drive, if need be.)