is photosynthesis created by sunlight and water

Yes, photosynthesis is a process in which sunlight, water, and carbon dioxide are combined by plants, algae, and some bacteria to convert them into glucose and oxygen. Sunlight provides the energy necessary for this process, while water is a source of hydrogen and oxygen atoms that are used to form glucose molecules.