The maximum amplitude (A
max) of spot-induced brightness variations from long-term V-band photometry and the ratio L
X/L
bol between X-ray and bolometric luminosities are suitable indicators of the level of magnetic activity in the photosphere and in the corona of late-type stars, respectively. By using these activity indicators we investigate the dependence of coronal X-ray emission on the level of photospheric starspot activity in a homogeneous sample of low mass main sequence field and cluster stars of different ages (
IC 2602,
IC 4665,
IC 2391,
α Persei,
Pleiades and
Hyades). First, the activity-rotation connection at the photospheric level is re-analysed, as well as its dependence on spectral type and age. The upper envelope of A_ max_ increases monotonically with decreasing rotational period (P) and Rossby number (R
0) showing a break around 1.1d that separates two rotation regimes where the starspot activity shows different behaviours. The A_ max_-P and A
max-R
0 relations are fitted with linear, exponential and power laws to look for the function which best represents the trend of the data. The highest values of A
max are found among K-type stars and at the ages of
α Persei and
Pleiades. We also analyse the activity-rotation connection at the coronal level as well as its dependence on spectral type. The level of X-ray emission increases with increasing rotation rate up to a saturation level. The rotational period at which saturation occurs is colour-dependent and increases with advancing spectral type. Also the L
X/L
bol-P and L
X/L
bol-R
0 relations are fitted with linear, exponential and power laws to look for the best fitting function. Among the fastest rotating stars (P≤0.3d) there is evidence of super-saturation. Also the highest values of L
X/L
bol are found among K-type stars. Finally, the photospheric-coronal activity connection is investigated by using for the first time the largest ever sample of light curve amplitudes as indicators of the magnetic filling factor. The activity parameters L_ X
/Lbol_ and A
max are found to be correlated with each other, thus confirming the dependence of coronal activity on photospheric magnetic fields. More precisely, the L
X/L
bol-A
max distribution shows the presence of an upper envelope, which is constant at the L
X/L
bol≃-3.0 saturation level, and of a lower envelope. The best fit to the lower envelope is given by a power law with steepness decreasing from F-G to M spectral types. However, it is considered a tentative result, since the fit reduced chi-squares are large. Such spectral-type dependence may be related to a colour dependence of A
max on the total starspot filling factor, as well as to the coronal emission being possibly more sensitive to starspot activity variations in F- and G-type than in M-type stars. The L
X/L
bol-A
max mean values for each cluster in our sample decrease monotonically with increasing age, showing that the levels of photospheric and coronal activity evolve in time according to a single power law till the Sun's age.