You can use the Align panel to align selected object to one another, but I find using ID's smart guides while dragging an object is faster.
That said, you don't really need two frames here. Make a large blue-filled text frame, set the Vertical Justification to Align: Center (add some inset to the top or bottom if you need to tweak a little visually) in the Text Frame Options dialog, and set the paragraph to center aligned.
Also keep in mind that whether you use two objects (text frame and colored box) or one text frame like Peter suggested, the positioning of the text is based on the full size of the font, which is measured from the lowest descender to the highest ascender. So, a box with an upper case A and one with a lower case j will have different distances from the top and bottom of the box, so if what you want is an even amount of box around your text, you might have to make an adjustment.
All boxes are aligned the same, but not visually centered.