HTML tags allow to mark up elements of text on webpage to indicate the browser how to displayed it. They can also have different functions related to links, page title, image, etc.
Some HTML tags are taken into account by Google and other search engines for ranking because there are a sign that the page is focused on a topic associated with the keyword.
For instance, html tags allowing to format an element of text or heading (bold, italic, H1, etc.) are taken into account.
The "title" tag of a webpage which tells the browser which title must be displayed in the title bar at the top of the browser is also important for SEO.