Darauf ging es zum Bett und zog die Vorhänge zurück:
Then Red Riding Hood went to the bed (grandmother's) and pulled the curtain back.
The dative case is used after many prepositions, including zu. Here, Bett is the object of the preposition zu. Zu dem is often contracted to zum.
"...so kam es ihm so seltsam darin vor..." (Rotkäppchen)
"It looked so strange to her there...
"ihm" shows the dative case here as the indirect object. Here, the -m marks the dative case. English commonly marks the indirect object with "to" as in "to her".