What is Sitelinks search box? 

Sitelinks search box is a search box that appears just below the description of website in Search Engine Results pages (SERPs) while you search any brand keywords in Google.

Early in September 2014 Google announced new sitelinks search box in Google’s SERPs. That search box markup became one of the fastest growing schema implementation on the web.

There are many other rich snippets available that Google developed to enhance it's search results.

Social Media Links Rich Snippet

Specify Organization's Logo

Specify Website URL

The complete information about the company or person is called knowledge graph.

Sitelinks search box is a best practice for any SEO Consultant to make their client's website more visible in Google. That will make your online brand reputation more strong.

Structured Data Markup

First of all you have to connect your website with Google search console (Google Webmaster Tool) and complete all the desired actions like
Setup all versions of URL
Select your preferred version of URLs
Select target country
and others

If you don't know how to connect Google search console to my website? You can visit this post here.
You can check your rich snippet status in search console by clicking "Structured Data" under "Search Appearance"

There are 3 formats which supported any structured data markup:

1. Schema.org
3. data-vocabulary.org

Most of the time Google recommends JSON-LD format.

I will explain you here to setup structured data markup using Schema.org format.

How to Enable sitelinks search box in Google search results?

First of all you have to develop a search box on your website where people can search into your website.

After it you can place JSON-LD code into your website

Structured data markup is most easily represented in JSON-LD format, which stands for JavaScript Object Notation for Linked Data. JSON-LD format is recommended by Google.
You can put the below code to your website