There are plenty of hostels in Cape Town and prices for a bed are quite competitive, especially outside of the peak December/January season. Hotels are spread all over and booking a bit into the suburbs can deliver a higher standard at a lower price.
As a Southern Hemisphere beach city, Cape Town hotels operate on a fairly predictable set of seasons. The peak season is generally from mid December through mid January, which is also typically has the best summer weather. High season for Cape Town hotels is usually from October through April, excluding the peak season in the middle.
Low season is generally from May through September, and prices don’t change much near the lower end of the market, but sometimes mid-range hotels can be quite cheap, and deals can be arranged if you are staying more than a few days.