Triac and Optoisolator not turning on lightbulb
Are you sure whatever is driving the MOC3010 can sink 15 mA? The MOC3010 is only guaranteed to switch at 15 mA forward current through the LED. The optriac may switch at lower forward currents, but the apparently Motorola bins those parts by forward current sensitivity, and the 3010 is the lowest sensitivity. 

  


  IFT = LED Trigger Current, Current Required to Latch Output


With a footnote:


  All devices are guaranteed to trigger at an IF value less than or equal
  to max IFT. Therefore, recommended operating IFlies between max
  3.IFT(15 mA for MOC3010, 10 mA for MOC3011, 5 mA for MOC3012) and absolute max IF(60 mA).


What is driving the LED? Can you measure the voltage on the IO line going to the optocoupler?

It's also worth noting that even with the microcontroller completely out of the picture, you'll only get 10 mA forward current with a 330Ω resistor (\$5V - 1.5V_{F} = 3.5V\$ across the resistor. \$\frac{3.5V}{330} = ~10.6 mA\$).