What are taxes used for? Would sound better
Used to is a grammatical aspect. Used for would be the passive of to use for...are used for. The sentence should be reworked.
"For what are taxes used?" is also correct.
"What are taxes used to do" is literal thêrefore intuitive and a good translation