For the first sentence, a more natural way of completing it would probably be "Click the document that you want to open" or "Click on the document you want to open" while the second sentence sounds fairly natural already.
1. Click the document that you want to open.
2. Click a document that you want to open.
Do you mean both of the above sentences are natural?
If so, is there any difference in the meanings between them?
(that is, the difference between "a" and "the" in this context.)
I wonder which I should use in the writing of operation manuals.
Which is your choice?
In most situations, either sentence can be used, but there is a difference in what the sentence implies about the speaker's expectations. Sentence 1 suggests that there is only one document that you would want to open. Sentence 2 implies that there may be more than one and that clicking on any of the ones that you want would be OK.
If you remove the last part of the sentence "you want to open", then the choice between "the" and "a" becomes much more important. "Click on the document" refers to a specific document. "Click on a document" refers to any document. There is a clear difference in the specificity of the statements.