I have the following code that does the cube rotation around position of child element. Child element is at bottom edge of the cube. This rotation takes place only when user presse right arrow key.
void update(){
if (Input.GetKeyDown(KeyCode.RightArrow)){
gameObject.transform.RotateAround(child.transform.position,Vector3.forward, -90);
}
}