When the Bolsheviks took power following the revolution, there was no symbol that they brought with them, and nor did they immediately have the power to institute such change.
However, they did have slogans that came with the revolution - the colour red, and a worker with a hammer, among others. Red already had a history of being used in social democrat political circles, and in protests in the nineteenth century. The worker with a hammer raised came from a group within the revolution. It was used in banners post-revolution depicting a new world being built(May Day 1918).
The sickle came in approximately a week later when the uniforms of the new Soviet military were created. I'm not sure who designed it, but this is the first case I saw of it occurring. Originally a plow was used, representing the peasant class as the hammer represented the worker class. According to an "order of the Military Commissariat dated 8 May 1918," all Red Army recruits were to receive the "Red Army's 'Star of Mars' with a hammer and plow", which was to be attached to their military caps. This lasted until May 1922, when the plow was replaced by the sickle on military medals.
The origin of the paired symbols was dated by Russian historians to 10th July 1918, when it first appeared on official Russian documentation out of the Fifth Congress of Soviets. Later historians found this to be incorrect, noting that it appeared earlier in 1918. However, since July 1918 is the first official use that would make a more correct timing for its appearance as a communist symbol as it was representative of the Soviet government.
So the summarised version:
When: the hammer was a preexisting symbol of a social democratic group that got appropriated by the communist movement in the revolution, October 1917. The sickle was an evolution of the plow, appearing in May 1922. Before that the plow had been used since May 1918.
How: The hammer originated from said preexisting group, and was combined with the plow, most likely through government run competitions to design the emblems of the new nation.
Why: The hammer was symbolic of the workers, and the sickle/plow of the peasant. Together these covered the proletariat which the new union claimed to represent and be the banner for.
All credit for this post goes to N. A. Soboleva who wrote a brilliant article on Russian symbols in the twentieth century. I'm not sure if the article would be publicly available anywhere, but it is available through EBSCO databases.
'From the History of Soviet Political Symbolism', N. A. Soboleva Russian Studies in History
As u/gileriodekel said, the hammer was a symbol of industry and the sickle a symbol of agriculture. The crossed hammer and sickle originated in Russia, around the time of the Bolshevik revolution. While traditional Marxist theory posits that communist/socialist revolutions can only occur in heavily industrialised countries, and are driven by the workers, Bolshevik leaders (Lenin included) argued that it was possible to create a socialist revolution with a revolutionary worker-peasant coalition; this suited Russia, which in 1917 was a predominantly agrarian country with a relatively small population of industrial workers.
After the October Revolution of 1917, the Bolsheviks needed to create new symbols for themselves in order to distinguish themselves from past regimes - one thing they urgently needed was a new seal (in the months immediately after the seizure of power, the Bolsheviks used a modified version of the Romanov double-headed eagle, but it was much to reminiscent of the tsarist regime for comfort). Lenin, along with Anatoly Lunacharsky (head of Narkompros, the Commissariat for Enlightenment) opened a contest for artists and designers to send in designs for a new seal. The most acceptable entry contained a crossed hammer and sickle, along with a wreath of grain, a rising sun, and a sword. Lenin objected to the inclusion of a sword, and after some debate the designed was refashioned to include only the crossed hammer and sickle, framed by the rising sun, and the wreath of grain. In August 1918, this became Soviet Russia's official national emblem.
As the first country to undergo a successful proletarian revolution and to actively work toward creating communism, a lot of Soviet Russia's symbolism has become general symbolism for communism around the world.
Source: Richard Stites, Revolutionary Dreams.