I think Martin was probably up to no good at the time that Zimmerman saw him, although it doesn’t sound as if he was committing a crime or had just committed one at that moment. But the idea that he’d walk 4 miles round-trip in the rain to buy a bag of Skittles is too ridiculous for words, so he was probably doing something else, such as selling drugs, casing places to burglarize, or whatever else it was that enabled him to buy that mouthful of gold caps.
Perhaps he thought Zimmerman was somebody from a rival drug selling operation who was out to get him and this was why he attacked Zimmerman.