The ciliary body is responsible for changing the shape of the eye lens, thereby controlling its focal length for proper focusing.