What is the relation between the boundary layer and lift of an aerofoil?
I wouldn't say that the boundary layer is responsible for creating lift, even if the real world friction enables the creation of circulation and therefore lift. It is mainly responsible for the drag.

Why? Take a look at airfoils in potential flow: they have lift but neither drag nor a boundary layer. Lift is created due to a pressure difference between the upper and lower side of an airfoil and you don't need any boundary layer to explain this pressure difference.

However, you do need a boundary layer to explain drag. The no-slip condition on the airfoil surface creates a layer with a high velocity gradient (from zero on the surface to $V_\infty$- the freestream velocity). Its thickness depends mainly on the viscosity the fluid around the airfoil:


No viscosity at all means no energy loss and therefore no drag.The velocity gradient can be infinite and the layer thickness is zero.
With higher viscosity the particles won't be able to follow such high velocity gradients and the distance between the no-slip surface to the freestream flow around the airfoil will be bigger: the boundary layer will be thicker. The drag will be higher too.