Regarding that you always add the same amount to the X and Y coordinates, theoretically the balls should move the same amount every loop. However, it's not quite good to leave the control of movement speed entirely to the screen refresh rate (and 10 is rather low for frame rate, it won't give you a smooth movement). I think you should consider implementing time-based movement.
Maybe you can also consider using dbMoveSprite, then you can give the sprite a direction and move it diagonally across the screen without calculating X and Y separately.
For bouncing balls back from the screen edge, I have two ideas:
1. Watch the coordinates of the ball and if it goes outside the screen area (for example: if x < 0 || x >= screenwidth), then bounce it back.
2. Make four rectangular sprites, one for each screen edge, and position them just outside the visible screen area. Then you can use dbSpriteCollision or dbSpriteHit, to detect when the ball collides with an "edge sprite". I haven't tested but I'm pretty sure collision detection should work even if one of the tested sprites is outside the visible area. (If not, you can position the edge sprites to make one pixel of them visible.)
Regarding the code: you don't need to call dbRandomize again in the collision function, that's enough once in the setup function. Also, this code:
int screenWidth,screenHeight;
int seed;
int x,y;
screenWidth = dbScreenWidth();
screenHeight = dbScreenHeight();
seed = dbTimer();
dbRandomize(seed);
x = dbRND(screenWidth);
y = dbRND(screenHeight);
would be much shorter like this:
dbRandomize(dbTimer());
int x = dbRND(dbScreenWidth());
int y = dbRND(dbScreenHeight());
EDIT: Hmm, I just noticed you provided the image as well and tested the program. The sprites are jumping all over the place, so there is some other problem here than time-based movement. I'll see if I can provide more advice a little later.