Pixy for LEGO comes with a special Pixy-to-LEGO cable and is preloaded with a version of the firmware that speaks the LEGO protocol by default. If you have Pixy for LEGO, just follow our Pixy for LEGO Quickstart Guide.
If you have “regular” Pixy, you can still hook it up to LEGO mindstorms. It will require you to make a cable, which is fairly easy, and you must have the correct hardware revision of Pixy (R1.3A). Look on at the backside of your Pixy. Does it look like the picture below (R1.3A)? If so, your Pixy will work with LEGO.
If the backside of your Pixy looks like the picture below (R1.3), your Pixy is not compatible with LEGO, unfortunately. :(
(Actually, the only difference between these two revisions is that R14 and R15 are 82K for revision 1.3A instead of 4.7K for revision 1.3, but replacing surface-mount resistors requires some decent amount of skill.)
Once you've made a cable, you'll need to set the Data out port to LEGO I2C in the Interface Tab in PixyMon.
And you're ready to follow the LEGO Quickstart Guide.