These two verses, and the ten or so before, and many subsequent verses, are detailing many of the stories of Bani Israeel at the time of Musa (alayhi salaam). This discourse details the escape of Bani Israeel from Fir'awn; the miraculous parting of the sea; their subsequent shirk with the golden calf, and repentance; their taking (and later breaking) of the covenant; their arriving at the promised city, and being cast out after refusing to listen to Musa; and more.
For these verses, Ibn Abbas narrates the meaning:
An-Nasa'i, Ibn Jarir and Ibn Abi Hatim recorded Ibn `Abbas saying, "Allah told the Children of Israel that their repentance would be to slay by the sword every person they meet, be he father or son. They should not care whom they kill. Those were guilty whom Musa and Harun were not aware of their guilt, they admitted their sin and did as they were ordered. So Allah forgave both the killer and the one killed.'' This is part of the Hadith about the trials that we will mention in Surat Ta Ha, (20) Allah willing. (Tafseer ibn Katheer)
After this happened, the very next two verses say:
And [recall] when you said, "O Moses, we will never believe you until we see Allah outright"; so the thunderbolt took you while you were looking on. Then We revived you after your death that perhaps you would be grateful. (Surah Baqarah, verse 55-56)
These two verses summarize an incident after the incident of the calf, during which Musa (alayhi salaam) took around 70 of Bani Israeel's leaders to an appointmed meeting place with Allah, where they demanded to see Allah directly (which is something impossible in dunya). You can understand this as a statement of argumentation or something like disbelief; Allah seized them with a lightning bolt.
Ibn Katheer then mentions:
(But you were seized with a bolt of lightning) saying; "They died, and Musa stood up crying and supplicating to Allah, `O Lord! What should I say to the Children of Israel when I go back to them after You destroyed the best of them.
(If it had been Your will, You could have destroyed them and me before; would You destroy us for the deeds of the foolish ones among us)' Allah revealed to Musa that these seventy men were among those who worshipped the calf. Afterwards, Allah brought them back to life one man at a time, while the rest of them were watching how Allah was bringing them back to life. That is why Allah's said,
(Then We raised you up after your death, so that you might be grateful.) Ar-Rabi` bin Anas said, "Death was their punishment, and they were resurrected after they died so they could finish out their lives.'' Qatadah said similarly.
I think this nicely summarizes and explains these two ayaat and their interconnection.