When would they have used rockets instead of normal artillery, and why? How come we don't use rockets as much today?
The short answer is recoil. Towards the end of war all belligerents where putting high priority on the mobility of forces. Rockets have almost no recoil compared to traditional artillery allowing them to be mounted on much smaller chassis and therefore smaller more mobile vehicles.
The obvious trade off was accuracy which was compensated for by firing large numbers of rockets simultaneously and getting closer to targets than guns could.
The real driver was cost, and battlefield vulnerability.
Russia was a major user of rockets, and for them the issue was rockets were cheap. They proliferated in 1942 when the Soviet factory system was in a state of chaos, having been evacuated and re-built, with factories populated by untrained labour and the army occupied by raw conscripts. A rocket launcher need little precision manufacture compared to an artillery piece, which needed very precise machining, sighting systems and so on. Aiming a rocket was easier, too, and they could make up for their lack of accuracy with weight of explosive.
Later, the Soviets got back into tube artillery with a vengeance, but they kept their rockets for their terror value and battlefield portability.
The Germans, being shot at by all this, were impressed. They built the Nebelwerfer, which could be pushed around by two men but fired a 280mm round. Six in fact, in a minute or so, and then the unit could be moved before the inevitable counter-battery fire came in. Which became a big factor for the Germans in 1943-44-45, and they lost control of the air and as their artillery became acutely vulnerable.
An artillery position took hours to set up, and a long time to break down, especially in the largely horse-drawn Wehrmacht. Such positions would be pinpointed and destroyed quickly. By D-Day, the Germans relied almost exclusively on mortars and rockets for indirect fire, while the Allies used their massive artillery with great enthusiasm, skill and precision.
So in short, the advantage of artillery is its precision, but against this it is expensive and potentially vulnerable.
I must disagree with /u/AwesomeOrca regarding recoil - while his statement is true, it is only part of the reason why rocket artillery was used.
Rockets were projectile and firing mechanism in one and lacked the recoil as /u/AwesomeOrca speak of. It meant that the launcher could be a simple tube and multiple tubes could be mounted to the same launcher, like the Russian Katyusha rocket launcher systems mounted on trucks.
I have detailed post here on how various nations handled artillery before and during ww2. The bottom line is that Germany and the Soviet Union were not very good at developing new artillery systems, while Britain and the US were very good.
Rocket artillery was a potential solution to one of the main artillery problems using the old artillery systems.
Basically, you had a forward observer aim the guns. He would observe where the shell landed, report back to the battery how the shot needed to be corrected, see the next shell land and repeat until each gun was zeroed in.
The problem was that troops knew this. When a single shell landed, they either moved out of the area really quickly, or they took cover, meaning that the barrage that would arrive would be far less effective. The US developed a system with proximity fuses and pre-calculated data, maning that the same gun could fire two or more shells that would land at the same time, and that all guns could fire immediately without zeroing in, making it hugely effective as the targeted troops often had no warning they were being targeted.
The Soviets made use of massive barrages of rocket artillery. Rocket artillery was inaccurate, so there was no need to try to zero them in. Instead they were fired in massive barrages - multiple launchers would all fire several rockets at the same time, blanketing an area and not giving the troops targeted any warning.
The Germans took after the Soviets and developed their Nebelwerfer system, but neither the British nor the Americans made any widescale use of rocket artillery, since they had systems that could provide the same thing with regular artillery.
Rocket launchers took a long time to reload, and after the initial barrage, they would need to retreat as they usually kicked up lot of dust due to the backblast of the rockets and the enemy often targeted counter-battery fire at those clouds and because they needed to reload.
Being inaccurate and slow to reload, they were mostly an offensive weapon while regular artillery was needed to provide defensive fire to support own troops.