During photosynthesis, glucose is produced. Before it is transported it is converted to sucrose.
Sucrose is actively transported into the phloem by the companion cells. The sucrose then diffuses into the neighbouring sieve tube cells. Water molecules in the xylem diffuses into the sieve tube cells increasing the pressure in these cells. It is this pressure which forces the sugar and water through the phloem.