I have recently been riding bmx, racing to be more specific. I ride around my neighborhood a lot when im not at the track and have noticed this loud clanking noise. I didn't know where it was coming from at first. Thought it was maybe the pedal. But then I started paying more attention to it. It happens on my right foot when I pedal. This happens about every 10-15 minutes and sometimes I don't get it for an hour or two. When I was at the track I was standing up at the gate with my right foot forward. Then it happened. I was simply standing there and it made the loud clank noise, but then I found out where the problem is.(sort of). When it happened my right foot went down one crank. My foot went foward with out the tire or bike moving. What's the problem? Will it cause future damage? My guess is that the crank is slipping and not engaging. I have a 3 piece cliq crank. I'll try to discribe the sound a little better. It sounds like your hitting the bottom bracket with a rock or tapping it with your finger.
I've had similar problems (clicking on the right side down stroke) before, and it is probably the bottom bracket. But the first thing to do is to check and make sure that you don't have a loose bolt/ nut somewhere. This could be in your pedal, the crank, or somewhere else in your drivetrain. If you make sure that everything is tight and it still doesn't go away it's time to try replacing your bottom bracket. It's a pretty easy fix, but does require a special tool. http://sheldonbrown.com/tooltips/cartridge.html