I think putting it into context makes the difference:
Person A: "I need [something] done by lunchtime."
Person B: "I will have it done by then."
Implies that Person B had not necessarily planned to complete the task by lunchtime, but now will because Person A has explicitly asked.
Person A: "I need [something] done by lunchtime."
Person B: "I will have done it by then."
Implies Person B would have completed the task by lunchtime regardless of Person A's statement.
Both are correct but, depending on the situation, one may not be appropriate.
The former response from Person B is submissive; Person A could be an employer giving an instruction to an employee, who confirms that the instruction will be carried out. The latter response could be seen as dismissive; Person B is stating that the instruction is redundant. Some employers may regard the latter as flippant, as if Person B feels he/she doesn't need to be given instructions.
Alternatively, the order of the words could be used to stress the importance of 'it' being 'done':
Person A: "I will help you do it tonight."
Person B: "I will have done it by then!"
If you change the response to 'have it done' it feels less powerful.