It depends.
1. Unlike most road riding, which is more steady state with consistent cadence for long periods, thus making full use of the long crank, mountain biking in technical terrain and cyclocross racing involve frequent drastic changes in cadence. Spinning the cranks back up to speed is better accomplished with a shorter crank, while powering up long climbs is best accomplished with a longer one. So I try to strike a balance between those requirements and look for crank length more like 20-21 percent of inseam length for the mountain bike or ‘cross bike (as opposed to 20.5-21.6 percent of inseam for a road bike).Of course, a the same crank length as the road bike works well on a mountain bike or ‘cross bike that is used for riding on dirt roads and relatively smooth trails.
2. I designed the bottom bracket height on Zinn full suspension bikes for a 200mm crank. On a custom hardtail or a custom full suspension bike, I can adjust this, but I recommend against using any longer than a 205mm on our stock-sized full-suspension 29ers for anyone who rides them in technical terrain, to avoid banging the pedals on rocks frequently. Plenty of people use 210mm cranks on our full suspension bikes but generally they are riding less rocky terrain.
3. A stock mass-produced mountain bike will probably not have a high enough bottom bracket to ride on technical trails with a crank any longer than 180mm, but some may work okay with up to a 190mm.
4. Triathlon or TT riding: Most triathletes or Time Trialers may choose to ride a crank closer to the lower end of the recommended range for their leg length to achieve a more aero position. A shorter crank means the knee doesn’t come up as high, so you can get your body down more. A tall rider will still benefit from cranks longer than the “industry standard” of 165mm to 175mm, but most will choose something less than the 21.6% of inseam calculation. So, for example, if your ideal crank length based on our formula is 210mm, you may step down to a 195mm or 200mm on a Time Trial bike.