I2C communication between arduino and uvga

can you explain me why the code doesn't work?

Not unless you define "doesn't work". That code does something. You expect it to do something. What either of those things is, though, is a mystery.

What does the code do? What do you expect it to do?

A picture of your Arduino with stuff attached, and a schematic, would be helpful, too.

You never read anything from the Wire instance. Why not?

An I2C device would be connected to digital pins 20 and 21. Is yours? Why are you diddling with the analog pins (as digital pins) in readX() and readY()? What is connected to analog pins 2 and 3? Why?

Does you space key not work?

xr=analogRead(2); 
yr=analogRead(3);

Why doesn't readX() have a return statement?