Michael Todd, the bassist for the band Coheed and Cambria, was arrested for armed robbery after he allegedly held up a Walgreens by claiming he had a bomb ... and this all went down right before they played a show!

According to police in Attleboro, MA ... Todd showed a pharmacist a cell phone note that said he had a bomb and demanded Oxycontin. He made off with six bottles of pain pills and fled via taxi.

But police say he was spotted in the cab and police were able to track it via the dispatcher ... to the Comcast Center where Coheed and Cambria were set to open up for Soundgarden.

Police said Todd was arrested without incident after he was identified by the cab driver, the pharmacist and by store surveillance video.