How to use wp_editor(); in functions.php then retrieve content in the template

You would need to add a metabox and then add the wp_editor as a field. You’ll then need to process/save the meta data before you ever get to the part where display the data.

I just did this this morning with the Types plugin, which is about the easiest thing that I’ve found. (Advanced Custom Fields and Metabox are also good options)

Or to code your metabox from scratch you could use the code from this answer: Post custom metabox textarea using wp_editor

The trick I use to format it properly on the output is adding the following to function.php:

/*
 * Recreate the default filters on the_content
 * this will make it much easier to output the meta content with proper/expected formatting
*/
add_filter( 'meta_content', 'wptexturize' );
add_filter( 'meta_content', 'convert_smilies' );
add_filter( 'meta_content', 'convert_chars' );
add_filter( 'meta_content', 'wpautop' );
add_filter( 'meta_content', 'shortcode_unautop' );
add_filter( 'meta_content', 'prepend_attachment' );

Then where ever you need to display the meta content call

if( $meta = get_post_meta( get_the_ID(), 'ID-of-your-meta-field', true ) ) : 
    echo apply_filters('meta_content', $meta );