The geometrical and electronic structures of a series of small CdSe quantum dots protected by various ligands have been studied by density functional theory. UV-vis spectra have been calculated by time-dependent density functional theory (TDDFT). The goal of this investigation is the rationalization of the basic properties of these systems, in particular, the nature of the exciton peaks. This study has been focused on the (CdSe)(x), x = 13, 19, 33, and 66, "magic-size" clusters that are characterized by high stability and large optical gaps. The geometries of the cluster are relaxed both in vacuum and in the presence of the surfactant ligands. To describe the interaction between the bare clusters and the surfactants, model types of ligands are introduced: fatty acids are modeled using formic and acetic acid and amines are modeled using ammonia and methyl amine. Present calculations demonstrate that the ligands play a crucial role in stabilizing the structure in a bulklike geometry and strongly affect the optical gap of the clusters, due to an optimal coordination of the surface atoms. For these "magic-size" clusters, the UV-vis spectrum is calculated at the TDDFT level. The calculated spectra are in good agreement with the experimental ones for clusters with the same dimension capped with the same type of Uganda. This suggests that our structures are realistic models of the actual quantum dots.