Yes, but unless you have a heart problem in which you have to continuously monitor your heart rate it doesn't make a whole lot of sense. You can tell with your breathing just as accurately. This is why you see so many power meters for sale - after one or two rides there's no further information you can get.
I think heart rate monitors are popular among cyclists. During heart contraction, a chest strap heart rate monitor measures small electrical signals. Optical heart rate monitors, on the other hand, shine a light into the skin and read how much is reflected back. Point-to-point accuracy is better with chest straps than optical heart rate sensors. Heartrate-measuring chest straps are the most accurate, with 99.6% accuracy. However, wrist-worn devices are less accurate.