Method and device for locating moving object through communication using light from visible spectrum