Photosynthesis takes in sunlight and carbon dioxide, along with water and nutrients, so the plant can make energy. That energy is used for cell growth and repair, producing seeds, etc. The plant will exhale oxygen as a byproduct of photosynthesis.
Similarly, cellular respiration is also used to create energy for the host organism. However, the cells take in oxygen along with something like complex sugars (ie the stuff you eat) and use those components to form energy for the cell. The energy for human cells is useful for cell growth and repair, nerve impulses, muscle contractions, etc. Basically anything you can think of that the human body needs to do on a regular basis, it requires energy to do so. A byproduct of cellular respiration is carbon dioxide, which is exhaled out to the environment. The plant will then absorb the CO2 to keep the cycle going.
In short, both processes are used to make energy for the cell. The differences is what the inputs for each process require. Photosynthesis takes in sunlight, water, and carbon dioxide (and other plant nutrients), and exhales oxygen. Cellular respiration takes in oxygen and complex sugars (from plant material or other animals) and exhales carbon dioxide.