You need to check the serial output, with the Photon connected to your computer via USB cable. With particle-cli, you can do: particle serial monitor. Or you can use a regular terminal program set to 115200 baud.
Try checking the docs for Particle.variable() and/or Particle.publish(). TCP/IP or UDP are also possible. Then there are webhooks, and direct http requests as well.
Should be plenty of choice, just depends on what you want to do with it and how comfortable you are with the coding.