"We were in bed" means that the speaker was in a bed - it could be any bed.
You had better go back to bed = You had better go back to sleep (in your bed).
In the third sentence, it is important to know which bed.
In the first two, "in bed" is a general term for being in a bed (any bed) and either resting or trying to sleep.