arduino+processing=proplem

Serial.println(sensorValue);

Send some text, like "238".

void serialEvent (Serial port)
{index=port.read();
  if(index<=450)
{
    
  bool="dark";
}
if(index>450)
{
  bool="light";
}}

Read one character, like '2'. If that is less than or equal 450 (it always will be) set a poorly named variable to "dark".

Is that consistent with what you see?