If you want to let the beans cool before refrigerating the beans after cooking them then you should let the beans cool down for an hour before refrigerating them.
You can however just put the beans into the refrigerator while they're still hot or warm and no harm will be done to the beans or your refrigerator doing so.
Sometimes I don't have time to wait for food to cool so I put it directly in the refrigerator after cooking and let it cool down that way and then heat the rest up later when I'm ready to eat it or serve it.