generally sort of, but there are some rather red suburbs with sometimes pretty decent densities, and with urban flight, not always the voter density one would expect in the city.
But generally, yes.
People that see a lot of different people tend to vote liberal, people that see only a few people tend to vote conservative. People that tend to see infrastructure tend to support it, people that see a lot of cows tend to not. Places with lots of people have a tendency to have a lot of local tax revenue and can afford infrastructure. Places with fewer people generally don't have such revenue and can't support infrastructure.
So generally, blue areas tax themselves to go guild things in red areas (rural electrification, federal highway system, army flood control, bridge to nowhere).