need help with project

I am trying to build a project where light sensors are connected to the arduino and they work like buttons. Each sensor controls a keyboard arrow. But I can't find the code for the arrows to use in the source code. please help!

Each sensor controls a keyboard arrow

If you can tell us what a "keyboard arrow" is and provide a link to the device you intend to use, we may be able to help.

basically all i want to do is create a remote control pad with arrows that correspond to the ones on the computer keyboard. I want to use this controller to manage remotely simple programs on the computer that require only the up, down, left and right keys. But I don't know what to enter in the source code to achieve this.

A good start would be some serial to keyboard convertor software. Its available for allowing serial devices to send keyboard strokes to your computer. Then its just a matter of sending the right codes out from the arduino serial. This will give you some pointers :

http://www.fileguru.com/downloads/serial_to_keyboard_converter

Sorry I can't tell you which is the best.....

Are you starting with an existing sketch that causes the arduino to behave as a keyboard? I believe that there are a couple of these floating around.

There seem to be two main ways to accomplish this. One involves making the arduino emulate PS/2 Keybaord hardware, and connect to the normal keyboard port of the computer. This involves no changes on the computer, but requires that the computer have a PS/2 keyboard port (getting rare, these days. You can use a USB/PS2 adaptor, probably.) And it requires some hardware development, even if that's only a "custom" cable between the arduino and the computer.
The other method uses the existing communications path between the arduino and the computer (USB/Serial), and special software on the PC side to "inject" data from that path so that it looks like keystrokes. This requires no hardware beyond the standard arduino, but does require software on both the arduino AND the computer. There are potential complications using existing sketches if you want to pass "special keys" (like the arrows) that are not part of the standard set of "serial.printable" characters, but they're probably easily solved with a bit of program modification...

There is some more info in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258067608