Yes, the aperture of the telescope, or the size of its objective lens if it's a refracting type, is important. However, 'aperture' here does not mean the same as 'aperture' in photography. In astrophotography, what photographers call 'aperture' would be called the 'focal ratio'. The larger a telescope's aperture, the more light it collects and the finer detail it can resolve. In general, it's not worth considering a refracting telescope with a lens smaller than 75mm.
Fast telescopes with ratios of f/4 or f/5 are great for wide-field and deep-sky imaging, while slow instruments with ratios of f/11 to f/15 will offer dazzling high-power images of the Moon and planets.