Apple - How do I re-center Spotlight search bar (Mac)?
Click and hold the Spotlight icon on the menu bar, until the Spotlight window has returned to its original location.
Since El Capitan, you can move the Spotlight bar/window. Just click-and-drag it to wherever you want.
The answer is two-fold.
Centering it horizontally: Drag the spotlight bar horizontally and you will feel a slight stickiness to a place. That is where you have centered it horizontally.
Centering it vertically: Similar to above, drag the spotlight bar, vertically and you will a stickiness to a place, and that's where you reach the vertical center.