Whether you're hanging from a pull-up bar, have your elbows in those ab straps, or you're on a machine, the leg raise is a great exercise... if you do it right. But most people don't. They start with their legs hanging straight down then flex at their hips. That's mostly a hip flexor exercise, not an ab exercise.
The Right Way
Hang from a pull-up bar with an overhand grip and your hands roughly shoulder-width apart. Flex your hips and bend your knees, holding them above your hips in front of your torso.
In a controlled fashion, roll your torso upwards, bringing your knees toward your chin. Slowly reverse this motion without allowing your knees to become un-tucked from your body. Don't use momentum or jerk your body at any point.
Here's how it looks in a "captain's chair" machine:
The way these exercises are usually performed – with your legs hanging down and flexing at your hips – is primarily a hip flexion exercise. Although this certainly involves the abs, the degree of involvement is negligible. Tuck your pelvis and you'll target the abs better.