Variational quantum eigensolver (VQE) is demonstrated to be the promising methodology for quantum chemistry based on near-term quantum devices. However, many problems are yet to be investigated for this methodology, such as the influences of optimization algorithm and basis size on the accuracy and efficiency for quantum computing. To address these issues, five molecules (H2, LiH, HF, N2 and F2) are studied in this work based on the VQE method using unitary coupled cluster (UCC) ansatz. The performance of the gradient optimization L-BFGS-B is compared with that of the direct search method COBYLA. The former converges more quickly, but the accuracy of energy surface is a little lower. The basis set shows a vital influence on the accuracy and efficiency. A large basis set generally provides an accurate energy surface, but induces a significant increase in computing time. The 631g basis is generally required from the energy surface of the simplest H2 molecule. For practical applications of VQE, complete active space (CAS) is suggested based on limited quantum resources. With the same number of qubits, more occupied orbitals included in CAS gives a better accuracy for the energy surface and a smaller evaluation number in the VQE optimization. Additionally, the electronic structure, such as filling fraction of orbitals, the bond strength of a molecule and the maximum nuclear charge also influences the performance of optimization, where half occupation of orbitals generally requires a large computation cost.