Why h4 is the best move here? Is not bishop to e2 better? Why does the kingside has to be weakened like this?

Thanks everyone for your answers. You all argue that the knight must remain on f4 so h4 prevents kicking it out. However, I just found another game in which h4 is played and this time there is no keeping the knight on f4. Could someone tell me what else happens here?
You're trying to analyze the very equal position with no significant tactical potential. Depending on minor tweaks of your engine settings, you may get a few "good" moves, including Be2, Ba3, c5 -- all approximately equal. 

Computers at lichess have limited resources, hence they spot only obvious stuff, and have a limited precision when evaluating moves. 

If you move h4 -- you're down about 0.1 pawn, I would not lose a sleep about that, Be2 is good enough and you should not worry what stupid engine says =)

Disclosure: I'm actually running one of the lichess analysis boxes, so I took a deep dive into the details. Here's what I found:


From your screen shot, you're running analysis on your local iPad, which is slow and may take some time to arrive to the good result. It would be much preferable to run the server side analysis, much faster and more precise.
I have found the game in question among your games and analysed it using various engines available. Most of the engines recommend c5 as the best continuation for White. However, for the lichess analysis we use a very conservative settings of Stockfish ("Analysis Contempt" is turned Off), this changes the focus from the active attacking moves to the "safe" defensive ones. And h4 is one of those nice safe moves.


As I have said earlier, it all depends on the minor tweaks of the engine parameters, the score difference is negligible and h4 is no better and no worse than a few other moves -- play what you like and don't worry about what computer says.



Answering the second part of your question, here's my analysis:



Bd3 seems to be "the best", with h4 and Be3 sharing the second place. Actually, while analysis was running, 4 or 5 top pretenders constantly swapped their places, sometimes h4 was on the top. Probably, if I run the analysis deeper, there will be a few moments when any of the top 5 moves will be declared "the best".

All in all, the analysis is not exhaustive, and it does not guarantee to give you the "absolute best move". The main purpose of the analysis was to spot your mistakes (8. h3? was clearly a mistake, losing 0.5 pawn), and propose something better, not necessarily the best.

Here's the analysis @ depth 24, h4 is way below.