I think it's more likely he could cause static and kill the motherboard than anything really, although obviously if it was turned on and live electricity to it, it would have been dangerous. Is there any sign he has eaten or nibbled anything inside? I have only seen inside laptops and apart from plastic and the odd bit of copper and solder (solder is metal) I don't think there is anything lethal in there or it wouldn't be safe for humans. However copper (inside wires and possibly in solder) if enough of it is eaten could cause toxicity and health issues.
Just keep an eye on him to see he is ok. It's unlikely he's eaten anything, although they do try and chew wires sometimes. You can guarantee if there is somewhere a hamster isn't supposed to go, they will go there! He probably thought it was a nice dark tunnel.
Probably the best way to tell is look inside the computer and see if anything looks chewed! You're supposed to earth yourself before touching anything inside - to prevent normal levels of static in your body from killing the motherboard
If you don't have an antistatic wrist band to attach to something then leaning against a radiator while doing it should do the trick (you earth yourself on the metal) and of course make sure it is switched off and (if it's a laptop) the battery removed.
Water is a good way of flushing any toxins from the system and hamsters drink water so that will help if he has eaten anything. How does he seem today?
Just being exposed won't have caused any harm - only if he has eaten something.