Grammatically, "it" is used here as a pronoun. As such, "it" is used as a noun that refers to something else that is easily identified. Your sentence is equivalent to the sentence:
"She finds [to stick to a diet] difficult"
So "it" serves as a placeholder for "to stick to a diet". In your sentence, the principal phrase is
"She finds it difficult"
The remaining words "to stick to a diet" simply identify what "it" is. Whenever you use the word "it", you must make it possible to identify what "it" refers to.