Your reasoning is correct.
If the solar cell is modelled as a voltage source $E$ in series with an internal resistance $r$ and the cell is connected to a load resistance $R_L$, the series current is given by Ohm's law:
$$I = \frac{E}{r + R_L}$$
or
$$E = (r + R_L)\cdot I $$
The output voltage $V$ of the solar cell is the voltage across the load resistance which is, by Ohm's law, $V = R_L\cdot I$.
Thus
$$V = R_L\cdot I = E - r\cdot I $$
There are two aspects here, the steady state aspect (what happens long after the switch closes or long after the switch opens) and the transient aspect, what happens just when the switch closes.
In your circuit, you would measure the full battery potential across the capacitor in the steady state with the switch closed. No current flows, and hence there is no U=I*R drop across the resistor.
Also, since no current flows, it is not particularly intuitive to talk about "voltage drop" across the capacitor. There will be a potential, but you can simply remove the capacitor completely and you will have the same potential (if you measure at the nodes where the capacitor was once attached).
For the transient state exactly when the switch closes, you will have a brief surge of charge flowing "through" the capacitor (as one side gains electrons and the other loses some).
If you reformat your circuit a bit, you will see that it is an "RC" filter where the capacitor is charged through the resistor as the switch closes. During that brief time, current flows through the resistor and into the capacitor until it's charged fully. The bigger the resistor is, and the bigger the capacitance is, the longer this takes, but eventually it reaches the steady state.
You can see it like the capacitor delays the equalization of potential in your circuit, but when it's in equilibrium, it doesn't do anything.
Just comment if something's still unclear..
Best Answer
Because, due to the redistribution of charges (and voltages), the electric field inside a resistor is stronger than the electric field inside a wire.
This redistribution happens automatically. Initially, the electric field is evenly distributed and the electrons in the wire move faster than the electrons inside the resistor. As a result, electrons accumulate in front of the resistor and positive ions accumulate behind it. This increases the voltage and the electric field across the resistor, causing the electrons inside the resistor to move faster.
Since the voltage of the battery stays the same, the increase of the voltage across the resistor leads to the decrease of the voltage and, therefore, the decrease of the electric field in the wire, causing the electrons in the wire to move slower.
As the electrons in the resistor move faster and faster and the electrons in the wire move slower and slower, at some point, their speeds will equalize. At this point, the redistribution of charges will stop and the current in all parts of the circuit will be the same.