Factors affecting the possibility of life on planets