Translation:It is hard to write essays.
In my experience:
難しい (むずかしい) is "hard" in the sense that something is challenging or difficult. Maybe it's above your skill level, or it could be really complicated.
大変 (たいへん) is "hard" in the sense that something is a laborious task, requiring a lot of time or effort, and/or something so important you can't afford to mess it up. (It also has a lot of other uses, depending on the context.)
A math problem you can't figure out would be 難しい.
A semester-long project worth 50% of your final grade would be 大変.
(For added confusion, 大変 is sometimes used to emphasize 難しい. You may encounter the phrase 大変難しい (たいへんむずかしい), which translates a bit like "dreadfully difficult.")