Big clue is all firmware is stored in memory. The memory will either be in a marked IC or inside the processor, checking part numbers against data sheets will give some insight. As for the actual OS or programming language, that is more difficult, if it shows no characteristics checkable from outside you have to try reading the code out of it and looking for clues there. Sometimes you will see copyright messages in the code or modular sections that have obvious purposes but there is no standard way to do it.
Brian.