You're likely thinking of "Phase IV" (1974), a sci-fi horror film where intelligent, mutant ants evolve in the Arizona desert and begin dominating the landscape.
Other films with killer ants in desert or arid settings include:
If you recall additional details—such as the era, specific ant behavior, or human characters—I can help narrow it down further.