In principle, the brightness can be varied using the PWM method (pulse width modulation): for example, for 50% brightness, turn on the LED for a certain period of time, then turn it off for the same period of time, and so on and so forth. If you perform fast enough, no flicker will be visible, and the brightness will be 50%.
Unfortunately, I have not yet found a way to switch the iPhone LED at a high enough frequency. Switching AVCaptureTorchModeOn / AVCaptureTorchModeOff doesn't look fast enough - or maybe the main thread (which I tried on) has too low priority on iOS.
Edit: iOS 6 now has an API for setting the level of the torch .
source share