Yes it could pose some risk to the pilot and machine. As this video shows, arrows and bolts can easily penetrate acrylic plastic and thin metal skins if the range is close enough.
So an arrow or bolt could penetrate the side window/door skin of a light civilian helicopter and cause, at minimum, a threat of injury to the pilot if fired from, say, less than 100 ft away. They often fly with the side doors removed, and in that case the pilot is as vulnerable as someone sitting in the open on the ground if the shooter is accurate (and lucky, as the rotor wash would affect the flight path somewhat and throw off the shooter's aim).
Less likely but still possible, an arrow/bolt fired from close range could penetrate a fuel cell/tank that was integrated with the outer skin and cause a leak, although this wouldn't bring a machine down right away.
Or an arrow/bolt could penetrate the cowl around the engine, and by chance cut a fuel line and bring the machine down, so that's a possibility if not a very high one.
As far as the rotating machinery goes, the item that would be vulnerable to an arrow or bolt would be the tail rotor blades, so a hit on a tail rotor blade could likely have an effect similar to throwing a rock through it, and cause enough deformation damage to a blade to set up a vibration. A pilot sensing a significant vibration through the anti-torque pedals would immediately fly away and land in a safe spot nearby to inspect the tail rotor.
As as far as the main rotor head and blades go, the effect would be mostly scratched paint.
If it was me flying the machine, and I knew there was somebody with a high powered crossbow or compound bow right below me under a tree canopy, I would certainly be a bit nervous about an arrow or bolt coming through the side door and sticking me, or though the chin bubble and getting me in the legs.
If I was the shooter, I'd be aiming for the pilot for sure, and probably adjust my aim upward to account for the rotor downwash. A hit would be mostly luck though although it would certainly motivate the pilot to leave the scene at minimum if the tip of an arrow was stuck in his/her arm.