My guess for Solo is that he was given the rank of General for the operation of destroying the shield generator. He was the most qualified for the operation, so he was made general.
As for Leia, her father was one of the founders of the rebellion. She has been involved in it since she was a child, more than likely, and has done many things, not just a courier. So she is a very high ranking offical in the rebellion, and has done many things for them before ANH.