I have a program to turn on lights, so i Activate a relay then the light turn on.
My question isso: can I control the light brightness only with this relay using analogWrite?
You cannot control a lamp's brightness using PWM through a relay. Relay's are not designed for fast on/off switching.
...R