In universe :
As you can see from the 1948 Batman #47 (Origin of the Batman), Batman wanted to create a suit that would "strike terror into criminals". He deliberately crafted an outfit in the style of a bat, decked out in a mixture of dark colours (blacks, purples and blues) that he feels will make him appear to be a "creature of the night".
His existing clothing in the previous panel consists of a black/blue jacket and dark trousers so these may be colours that he already favours.

A near-identical origin story is seen in the earlier Detective Comics 033 - 1939 albeit with Bruce Wayne wearing a different outfit when he sees the bat. In that case, the bat itself is shaded in blue and grey...

Out of Universe
The best explanations I've seen are that printing conventions (not to mention technology) in the earliest days of the Batman comics favoured the sparing use of black ink. Blue was used to create the impression of darkness without having to actually use fill colours. It was also used to highlight black areas where grey would look out of place.
You'll also note that those serials that are intended for younger audiences often favour a bluer palette whereas those that are for older audiences are literally darker with Batman in black.
As you can see from the (huge) diagram below, Batman's suit has changed colour dramatically over the intervening years but almost always with an emphasis on blue for the comics and black for the films where high-contrast materials work better.

Although it may be a total coincidence, the original dictionary that inspired the design of the Batman outfit was itself bound in heavy blue with yellow stripes.
