We define the partition and n-point functions for a vertex operator algebra on a genus two Riemann surface formed by sewing two tori together. We obtain closed formulas for the genus two partition function for the Heisenberg free bosonic string and for any pair of simple Heisenberg modules. We prove that the partition function is holomorphic in the sewing parameters on a given suitable domain and describe its modular properties for the Heisenberg and lattice vertex operator algebras and a continuous orbifolding of the rank two fermion vertex operator super algebra. We compute the genus two Heisenberg vector n-point function and show that the Virasoro vector one point function satisfies a genus two Ward identity for these theories.