AF works by using light and bouncing it off a sensor in the body. If there isn't enough light then the camera has no idea what to focus on. Notice the bright light that comes on as the focus is being achieved? This is to assist the focus sensor. You'll know when the body can't focus because it will hunt around, and usually the in-focus dot will not light green. (nikon's use this, not sure about others.)
If there is enough light to see through the viewfinder, switch the lens to MF and focus that way. When you focused on your hand, the focus point was right in front of the camera, not what you wanted to shoot.