There used to be an air force station and missile rest range there and there was a whole lot of uninhabited space that the federal government was able to buy up for this purpose. The climate also allows for year round operations.
Well, actually they aren't anymore. Since the only launches are being done by private companies these days, they can opt to rent pads from NASA or build their own. SpaceX, for example, has launches in Florida, Texas, and California.
The launch pads are where they are because of the massive research that went into deciding where the safest place would be. In nature we have Tradewinds and it just so happens that in Florida the Tradewinds that come through state leave the area of Kennedy Space Center and the Cape in the clear for the safest conditions on launches, not only for the Space Shuttle but for Rocket launches (I paid attention in Environmental Science). Check it out. It was interesting to learn.
Thanks! Your answer is awaiting moderation.