The lowest-energy structures of Li-n-1, Lin and Li+n+1 clusters (n=20, 40) were determined from first-principles simulated annealing followed by geometry optimization within the density functional theory. The growth mechanism of Lin clusters is based on nested multiple polyhedron. Other atoms form pentagonal pyramid centered on the core polyhedron. From our first-principles calculations, the molecular orbital levels can be divided into several groups, which are in good agreement with the electron shells described by structureless jellium model. With the same amount of valence electrons, the number of ions and charge states in the Li clusters have only little effect on the electronic structures. Li-19, Li20, Li+21 and Li-39, Li40, Li+41 exhibit similar energy level distributions, respectively, indicating that the momentum order is the dominating factor for these clusters. The optical absorption spectra of Li-n-1, Lin and Li+n+1 (n=20, 40) clusters from time-dependent density functional theory calculations show giant resonance phenomenon and the simulated resonance peaks agree with experimental values. With same amount of valence electrons, the polarizability decreases with the number of ions and the optical resonance peaks blueshift as the ionic number increases.