To rotate buildings before being placing, roll the mouse wheel up or down. If you do not have a mouse wheel or are maybe playing on a laptop, hold SHIFT and press either A or D to rotate.