The optical sensor is the easiest. Connect pin 1 to +5V, pin 3 to a resistor with the other end connected to ground. Connect your analog input to pin 3 also. Choose the resistor depending on the light level you want to detect- lower light levels need higher values. Maybe start with 1K resistor and check the readings between dark and light. Be aware that the sensor you have bought is much more sensitive to red light than to blue light.
The MQ-7 is harder. You cannot just connect it to 5V, the supply voltage must be switched between 1.4 and 5V as shown in Fig 5 on the data sheet. Did you check this link http://playground.arduino.cc/Main/MQGasSensors ? Also be warned that the readings are sensitive to temperature and humidity so you will need to compensate for those if you want accurate and stable readings.