There really aren't many similarities between the two. Both were in World War I, they were in close proximity to each other, and both used a Creeping barrage (a line of artillery fire a measured distance ahead of the advancing infantry), but that's about the extent of the similarities.
The Battle of the Somme began July 1, 1916 and ended November 18, 1916. It was initially planned for Aug. 1 conceived as a battle of attrition meant to deprive the Germans of personnel, and was supposed to be a largely French operation. A German attack at Verdun forced the British to carry out most of the battle, and moved up the timetable to divert German forces away from Verdun. The battle was preceded by an eight day artillery barrage and officially began with the detonation of 17 mines (one of which formed the Hawthorne crater) and a creeping barrage. Unfortunately, many of the British rounds turned out to be duds, and did little damage to the German fortifications. As a result it was largely a "turkey-shoot" for German Machine gunners. French forces did make some gains on the Southern flank, but the British forces were largely repulsed. Over the coming weeks, owing largely to the introduction of tanks along some stretches of the field (which extended from the Somme river, North to a point between Allied Arras, and German held Albert), British forces managed to capture some German front-line trenches, but these gains were largely pointless. British Casualties were numbered at 420,000. French Casualties were 200,000. German casualties were 500,000.
The Battle of Vimy Ridge was fought on Easter Monday (April 9) 1917. The Ridge had been captured by German forces in September 1914, and used to bombard the Allied village of Arras, 12 km away. This bombardment had put pressure on the Allied north flank on the Somme battlefield. British Artillery bombarded the ridge for 3 weeks, then commenced a creeping barrage ahead of the advance of a Canadian force. German frontlines fell in just 30 minutes. Three-days later, the entire ridge was securely in Allied hands, and remained so until the end of the war. It was the most successful allied advance of the war to that date. Only 3,598 Canadian soldiers were killed, and 10,602 wounded. Germany suffered 20,000 casualties. Four Canadians were awarded Victoria Crosses (the Canadian equivalent of the American Distinguished Service Cross).
Although related due to the Flank position relative to the Somme, the battles were vastly different. The Somme was a bloody stalemate while Vimy Ridge was a stunning success. The Somme lasted over 4 months, Vimy Ridge was over in just 3 days. The Somme cost over 500,000 Allied casualites, Vimy Ridge less than 14,000.