Get image URL from media library in input

I am assuming you have a way to generate the attachment ID when inserting the image. You can then use the attachment ID to populate the input value. Are you not talking about an on-page input field?

Try something like this:

<?php 
//First get the attachment ID
$attachment_id = 8;
?>

<input type="text" name="tj_image_url" id="tj_image_url" value="<?php echo wp_get_attachment_url( $attachment_id ); ?>" />