Is this a valid or legitimate way of comparing countries on traits and characteristics?
I have no idea whether there are formal rules, but you can emulate physical scientists and look at the units.

Dividing solar power by population is reasonable, as you get megawatts per capita. Those refer to real quantities. 

However, you are dividing by GDP (in a roundabout fashion). The units of GDP are (currency unit)/(year). Since megawatts are a real quantity, and thus no currency value, the resulting ratio is (megawatts)(years)/(currency unit). This does not appear to correspond to anything.

You could try to fit a model that predicts solar capacity as a function of wealth and population, and the model calculations should implicitly correct the units.