According to my textbook, with TDM, each circuit gets all of the bandwidth periodically during brief intervals of time (that is, during slots).
Yes, that's correct.
If we have a circuit switched network where each link uses TDM with 24 slots and has a bit rate of 1.536 Mbps.
That's typical for T1 line, in which line is made from 24 DS0 64kbit/s channels.
How come we divide the bit rate (bandwidth) by 24? I thought each slot gets the full 1.536 Mbps?
No, the line would be then 24x1.5Mbit/s, not 1.5Mbit/s. The whole idea of TDM is that you take a line, clocked appropriately (for T1 it's usually Stratum 3 class clock), to fit a defined number of DS0 channels. Your specific service can get one DS0 (64kbit/s), two (128kbit/s), three (192kbit/s) - and up to full bandwidth of the link (1.5Mbit/s).
Think about it this way: each second, 1.5Mbit is sent over the link according to clocking of the line. Depending on how many channels (DS0's) you were allocated in your service specification, you'll be able to send that much of bits over the link.
BTW, in Europe we use E1's, that have 30 channels, each at 64kbit/s for 2Mbit/s, but again, the service can get anything from one channel up to full set of channels - to the level of 2Mbit/s.