I don't think it's a small little box you just buy in a general store.
The joystick port is also a midi port and can thus receive data from any device that can send data (and apps listening to the midi/game port can act on it).
How it's connected to the midi port or lpt/com. I dunno. If you want to try such a project you might first want to go and buy the parts required (and a soldering iron) as you would probably have to put it all together yourself.
Pin layout and such is important and it's either documented by the company making the PCB/Sensor units or you'll have to figure it out yourself and develop your own communication application to communicate via those pin layouts (RX/TX/etc)
I've got one of those light sensor things somewhere, but I've forgotten what it's called too
AFAIK, light shining on it produces a current. Hence, it would need to connect to some sort of device, which then could connect to any port you wanted.